-
-
Save anonymous/4ce0b1f358e451f4385e 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
class mig::agent { | |
case $::operatingsystem { | |
'CentOS', 'RedHat': { | |
package { | |
'mig-agent': | |
ensure => latest, | |
} | |
} | |
'Ubuntu': { | |
package { | |
'mig-agent': | |
ensure => latest, | |
} | |
} | |
} | |
if ($fqdn == 'opsec1.private.phx1.mozilla.com'){ | |
# when the package is upgraded, exec a new instance of the agent | |
exec { | |
'restart mig': | |
command => '/sbin/mig-agent -q=shutdown; /bin/sleep 2; /sbin/mig-agent', | |
subscribe => Package['mig-agent'], | |
refreshonly => true | |
} | |
} | |
file { | |
'/usr/local/sbin/update-mig-agent': | |
ensure => file, | |
owner => root, | |
mode => 0755, | |
source => 'puppet:///modules/mig/bin/update-mig-agent', | |
} | |
file { | |
'/etc/cron.d/update-mig-agent': | |
ensure => file, | |
owner => root, | |
mode => 0644, | |
source => 'puppet:///modules/mig/cron.d/update-mig-agent', | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment