Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added idempotency #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions manifests/dev.pp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
class grafanadash::dev() {
# hack; there is probably a module for this
exec { '/usr/sbin/setenforce 0': }
exec { '/usr/sbin/setenforce 0':
unless => '/usr/sbin/getenforce | grep -c Disabled'
}

# this is stupid, for anything other than dev
service { 'iptables':
Expand Down Expand Up @@ -32,6 +34,7 @@
# super hacky but for some reason the graphite database is coming up
# as locked until we restart apache?
exec { '/bin/sleep 10':
} ->
exec { '/sbin/service httpd restart': }
unless => "/usr/bin/wget -q -O /dev/null http://${::graphite::gr_web_servername}:${::graphite::gr_apache_port}",
notify => Service['httpd'],
}
}