Created
March 3, 2014 16:39
-
-
Save reidmv/9328890 to your computer and use it in GitHub Desktop.
Simple example of an "app" as it might look being managed by a non-root Puppet agent
This file contains hidden or 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
class app ( | |
$ensure = running, | |
) { | |
file { '/tmp/example.txt': | |
ensure => present, | |
content => "valuable words\n", | |
mode => '0644', | |
} | |
service { 'app': | |
ensure => $ensure, | |
start => '/bin/bash -c \'while true ; do echo -e "HTTP/1.1 200 OK\n\n ExampleApp $(date)" | nc -l 1500; done &\'', | |
stop => '/usr/bin/pkill -f ExampleApp', | |
status => '/usr/bin/pgrep -lf ExampleApp', | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment