vchepkov
07/26/2022, 4:39 PMYorokobi
07/26/2022, 4:39 PMvar: null
is valid YAML for null/nilYorokobi
07/26/2022, 4:39 PMvar:
or var: ~
natemccurdy
07/26/2022, 4:40 PMspin
07/26/2022, 4:41 PMYorokobi
07/26/2022, 4:42 PMpuppet lookup my_class::var
say about it?natemccurdy
07/26/2022, 4:42 PM~
instead of null
.
I recall hitting something where null
was being cast to a string, butI can’t remember if that was just in spec tests or in real Puppet runs.natemccurdy
07/26/2022, 4:42 PM~
instead of null
.
I recall hitting something where null
was being cast to a string, butI can’t remember if that was just in spec tests or in real Puppet runs.Yorokobi
07/26/2022, 4:45 PMvar: null
as null (not a string) ... ¯\_(ツ)_/¯spin
07/26/2022, 4:48 PMnatemccurdy
07/26/2022, 4:50 PMbastelfreak
07/26/2022, 4:51 PMspin
07/26/2022, 4:51 PMGreg Bristol
07/26/2022, 4:51 PM''
which is true iircGreg Bristol
07/26/2022, 4:51 PMundef
valuesnatemccurdy
07/26/2022, 4:58 PM~
and null
are correctly pulled in as undef
via APL.natemccurdy
07/26/2022, 5:01 PM# test/manifests/init.pp
class test (
$param1,
$param2,
) {
notify { 'param1':
message => "type: ${type($param1)}: ${param1}",
}
notify { 'param2':
message => "type: ${type($param2)}: ${param2}",
}
}
---
# common.yaml
test::param1: ~
test::param2: null
Puppet 6.17.0 and 7.17.0 both produce this:
Notice: type: Undef:
Notice: /Stage[main]/Test/Notify[param1]/message: defined 'message' as 'type: Undef: '
Notice: type: Undef:
Notice: /Stage[main]/Test/Notify[param2]/message: defined 'message' as 'type: Undef: '
Dr Bunsen Honeydew
07/26/2022, 5:01 PMnatemccurdy
07/26/2022, 5:07 PMif
conditional.spin
07/26/2022, 5:13 PMspin
07/26/2022, 5:14 PMspin
07/26/2022, 5:35 PMSlackbot
07/26/2022, 5:46 PMDr Bunsen Honeydew
07/26/2022, 5:46 PMpuppetlabs-firewall
module at https://forge.puppet.com/puppetlabs/firewall?src=slack&channel=puppetCorporate Gadfly
07/26/2022, 5:47 PMpuppetlabs-firewall
useful on SLES 15, I had to make the following changes:
• added code to persist firewall rules, when they change, pseudo-code as follows:
Firewall {
notify => Exec['persist-firewall-rules'],
}
• disable firewalld
in systemd
• added systemd
service for iptables
◦ stop will flush the iptables
rules
◦ start will load the iptables
rules from the persisted locationCorporate Gadfly
07/26/2022, 5:50 PMCorporate Gadfly
07/26/2022, 5:50 PMspin
07/26/2022, 6:28 PMsmortex
07/26/2022, 6:29 PM~
in common.yaml? Looks like a smell: better default to undef
in the manifest.spin
07/26/2022, 6:30 PM