Slackbot
01/15/2023, 4:22 PMSlackbot
01/16/2023, 3:19 AMSlackbot
01/16/2023, 1:24 PMAnimesh Sahu
01/16/2023, 7:41 PM{} ? And donot overwrite if already exists. I think content => '{}' overwrites.Lumiere
01/16/2023, 7:51 PMto_json_pretty from stdlib to convert it to {}. once it gets content, to_json_pretty would just write the contentcsharpsteen
01/16/2023, 8:30 PMcontent => "{}" should be fine. I don't think to_json_pretty adds any functionality over that.
To avoid overwriting, use `replace => false`: https://www.puppet.com/docs/puppet/7/types/file.html#file-attribute-replaceSlackbot
01/16/2023, 8:58 PMDavid Sandilands
01/16/2023, 11:19 PMSlackbot
01/16/2023, 11:42 PMDavid Sandilands
01/16/2023, 11:42 PMwith function with a lambda https://www.puppet.com/docs/puppet/7/function.html#with the example given here is not great, ive struggled to find code using it anywherehelindbe
01/17/2023, 9:21 AMSlackbot
01/17/2023, 9:26 AMNeeloj
01/17/2023, 9:30 AMinclude key? I use here -> (doesnt work) can I also use before attribute in package ? thank you all
class myclass {
$osfamily = $::facts["os"]["family"]
case $osfamily {
'RedHat': {
package { 'install xinetd':
ensure => installed,
name => 'xinetd',
} -> include myclass::testclass
}
}
}Yury Bushmelev
01/17/2023, 10:53 AMpackage { ...
...
before => Class['Myclass::Testclass'],
}Neeloj
01/17/2023, 10:56 AMpackage { ...
...
before => Class['Myclass::Testclass'],
}
include myclass::testclassNeeloj
01/17/2023, 10:57 AMSlackbot
01/17/2023, 12:22 PMYury Bushmelev
01/17/2023, 1:01 PMSlackbot
01/17/2023, 2:00 PMYury Bushmelev
01/17/2023, 2:30 PMDr Bunsen Honeydew
01/17/2023, 5:45 PMwil.rodriguez
01/17/2023, 6:32 PMSlackbot
01/17/2023, 6:35 PMJoe Abbate
01/17/2023, 8:08 PMAndy Fry
01/18/2023, 3:56 AMn3snah
01/18/2023, 3:57 AMunless?
curl (host url from awx) 2>/dev/null | grep -c $hostnamen3snah
01/18/2023, 3:57 AMunless statement returns 0Andy Fry
01/18/2023, 3:57 AMAndy Fry
01/18/2023, 3:57 AMn3snah
01/18/2023, 3:58 AM