Nishar
11/10/2022, 4:41 PMNishar
11/10/2022, 4:41 PMChris Lee
11/10/2022, 4:41 PMNishar
11/10/2022, 4:41 PMChris Lee
11/10/2022, 4:41 PMNishar
11/10/2022, 4:41 PMChris Lee
11/10/2022, 4:42 PMChris Lee
11/10/2022, 4:43 PMChris Lee
11/10/2022, 4:43 PMChris Lee
11/10/2022, 4:43 PMYorokobi
11/10/2022, 4:44 PMfacter? (or facter -d)Nishar
11/10/2022, 4:50 PMjosh
11/10/2022, 5:28 PMpuppetserver 6.0.0 and puppet-agent 6.28.0 on the same host.Slackbot
11/10/2022, 5:30 PMBrian Schonecker
11/10/2022, 5:31 PM$a = '/tmp/{foo,bar}'
file{$a:
ensure => directory,
}
in Hiera? I've got a lot of directories I need to create under a single parent directory and I don't want to have to do:
---
file:
/tmp/foo:
ensure: directory
/tmp/bar:
ensure: directory
/tmp/baz:
ensure: directory
but the following doesn't work:
file:
/tmp/{foo,bar,baz}:
ensure: directory
because it yields a single file called /tmp/{foo,bar}.Brian Schonecker
11/10/2022, 5:31 PM$a = '/tmp/{foo,bar}'
file{$a:
ensure => directory,
}
in Hiera? I've got a lot of directories I need to create under a single parent directory and I don't want to have to do:
---
file:
/tmp/foo:
ensure: directory
/tmp/bar:
ensure: directory
/tmp/baz:
ensure: directory
but the following doesn't work:
file:
/tmp/{foo,bar,baz}:
ensure: directory
because it yields a single file called /tmp/{foo,bar}.Brian Schonecker
11/10/2022, 5:31 PM$a = '/tmp/{foo,bar}'
file{$a:
ensure => directory,
}
in Hiera? I've got a lot of directories I need to create under a single parent directory and I don't want to have to do:
---
file:
/tmp/foo:
ensure: directory
/tmp/bar:
ensure: directory
/tmp/baz:
ensure: directory
but the following doesn't work:
file:
/tmp/{foo,bar,baz}:
ensure: directory
because it yields a single file called /tmp/{foo,bar,baz}.josh
11/10/2022, 5:37 PMpson which is lossy and breaks deferred resources. For example, the cached catalog may contain the following resource parameters:
"parameters":{"message":"Deferred({'name' => 'sprintf', 'arguments' => ['%s', 'I am deferred']})"}}]natemccurdy
11/10/2022, 5:38 PM$dirs = [
'/tmp/foo',
'/tmp/bar',
]
file { $dirs:
ensure => directory,
}
-----
The hiera data version of $dirs is just an array in YAML:
dirs:
- /tmp/foo
- /tmp/barBrian Schonecker
11/10/2022, 5:40 PMnatemccurdy
11/10/2022, 5:44 PMCorey Hickey
11/10/2022, 6:35 PMexec resources can respond to refresh events (via notify, subscribe, or the ~> arrow). The refresh behavior of execs is non-standard, and can be affected by the refresh and refreshonly attributes:
If the exec has already run and then receives an event, it runs its command up to two times. If an onlyif, unless, or creates condition is no longer met after the first run, the second run does not occur.
----------------------------------------------------------------------------------------------------------------
If refresh events are received via notify, subscribe, and the ~> arrow, then doesn't that create an ordering dependency such that the resources which provide the events will always run before the exec which receives those events? How can an exec receive an event after it has run?natemccurdy
11/10/2022, 6:44 PMnatemccurdy
11/10/2022, 6:45 PMCorey Hickey
11/10/2022, 6:45 PMCorey Hickey
11/10/2022, 6:48 PMCorey Hickey
11/10/2022, 6:50 PMexec worked that way even way back then, though I wouldn't rule out me not knowing that.natemccurdy
11/10/2022, 6:50 PM