Created
February 6, 2013 19:40
-
-
Save richardc/4725160 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
rm /tmp/hosts.cfg | |
puppet apply -e 'nagios_host { "foo": target => "/tmp/hosts.cfg", check_command => "a_mistake" }' | |
grep check_command /tmp/hosts.cfg | |
# Not what we want - the resource doesn't change as undef doesn't make it | |
# through to the type to clear the value | |
puppet apply -e 'nagios_host { "foo": target => "/tmp/hosts.cfg", check_command => undef }' | |
grep check_command /tmp/hosts.cfg | |
# Not what we want - absent setting to a value | |
puppet apply -e 'nagios_host { "foo": target => "/tmp/hosts.cfg", check_command => "absent" }' | |
grep check_command /tmp/hosts.cfg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment