Created
May 1, 2014 15:27
-
-
Save logicminds/4357821679592bfaef1e to your computer and use it in GitHub Desktop.
puppet provider issue
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
#!/usr/bin/env bash | |
# first create the file with puppet just like sensu does | |
puppet apply --verbose -e 'file{"/tmp/testfile.txt": ensure => present, content => "foobar"}' | |
# now try to write to the file from ruby code (aka. the provide) just like puppet | |
cat > /tmp/providertest.rb << 'EOF' | |
#!/usr/bin/env ruby | |
File.open('/tmp/testfile.txt', 'w') do |file| | |
file.write('hello world') | |
end | |
EOF | |
ruby /tmp/providertest.rb | |
/tmp/testfile.txt | |
/tmp/providertest.rb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment