P. Aiello
12/03/2022, 10:50 AMP. Aiello
12/03/2022, 3:02 PMP. Aiello
12/03/2022, 3:02 PMSlackbot
12/03/2022, 7:43 PMSlackbot
12/04/2022, 2:14 AMYury Bushmelev
12/04/2022, 4:35 AMYury Bushmelev
12/04/2022, 4:36 AMSlackbot
12/05/2022, 3:55 AMSlackbot
12/05/2022, 5:36 AMYorokobi
12/05/2022, 10:42 PMnatemccurdy
12/05/2022, 10:58 PMreplace => false
https://puppet.com/docs/puppet/7/types/file.html#file-attribute-replacenatemccurdy
12/05/2022, 10:59 PMNote that this only affects content; Puppet will still manage ownership and permissions.Yorokobi
12/05/2022, 11:01 PMreplace => false setting only ensure => present as well?natemccurdy
12/05/2022, 11:02 PMYorokobi
12/05/2022, 11:02 PMnatemccurdy
12/05/2022, 11:02 PMnatemccurdy
12/05/2022, 11:03 PMYorokobi
12/05/2022, 11:03 PMYorokobi
12/05/2022, 11:04 PMnatemccurdy
12/05/2022, 11:06 PMFile[/etc/seed.txt]
2. A service: Service[foo]
3. Another file created by the service when it runs for the first time?
And should the service always read the seed (1) and create the other file (3) when it starts? Or does that only happen as needed (i.e. when (3) doesn't exist)?natemccurdy
12/05/2022, 11:06 PMFile[/etc/seed.txt]
2. A service: Service[foo]
3. Another file created by the service when it runs for the first time?
And should the service always read the seed (1) and create the other file (3) when it starts? Or does that only happen as needed (i.e. when (3) doesn't exist)?Yorokobi
12/05/2022, 11:09 PMYorokobi
12/05/2022, 11:10 PMnatemccurdy
12/05/2022, 11:10 PMYorokobi
12/05/2022, 11:10 PMnatemccurdy
12/05/2022, 11:11 PMYorokobi
12/05/2022, 11:12 PMYorokobi
12/05/2022, 11:12 PMn3snah
12/05/2022, 11:14 PMnatemccurdy
12/05/2022, 11:15 PMtrue or false. You could then wrap the seed file's file resource in an unless $facts['splunk_admin_hash_exists'] { conditional (using whatever fact name you created).
But that's pretty fragile....
+1 to Bolt, or some other orchestration tool. Even just a wrapper script that handles it all so the files themselves aren't Puppet-managed would probably be better.