Last active
October 21, 2015 03:36
-
-
Save calum-github/b492d0aff39a37577b37 to your computer and use it in GitHub Desktop.
puppet
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
| # Ensure we have docker running and enabled (starts at boot) | |
| service {"docker": | |
| ensure => running, | |
| enable => true, | |
| } | |
| # Ensure we have docker installed and it is the required version. | |
| package { "docker": | |
| ensure => "1.7.1-115.el7", | |
| } | |
| # Ensure our docker containers are stopped and restarted after the upgrade | |
| exec {"Refresh docker containers": | |
| command => "systemctl stop $(systemctl list-units --type=scope | awk -F \' \' \'/docker/ {print $1}\' | head -n1); systemctl stop $(systemctl list-units --type=scope | awk -F \' \' \'/docker/ {print $1}\' | tail -1); systemctl restart docker", | |
| path => [ "/bin/", "/sbin/" , "/usr/bin/", "/usr/sbin/" ], | |
| refreshonly => true, | |
| subscribe => Package['docker'], | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment