system-config/modules/meetbot/manifests/init.pp
James E. Blair ae0f98e0cd Use unattended upgrades.
Stop using latest for packages installed by puppet.  This way,
all system packages get updated, not just some random ones.

The unattended-upgrades config will email root.  It is configured
for openstack servers and jenkins slaves, but not template hosts
so that it doesn't interfere with spin-up.

Also, fix some bits in the gerrit module that were causing
continuous restarts on gerrit-dev.

Install emacs.

Change-Id: I51c9083ccd3669f284fce4b50c36a37a0cac92d8
2012-06-05 22:59:46 +00:00

67 lines
1.3 KiB
Puppet

class vcs {
# if we already have the git repo the pull updates
exec { "update_meetbot_repo":
command => "git pull --ff-only",
cwd => "/opt/meetbot",
path => "/bin:/usr/bin",
onlyif => "test -d /opt/meetbot"
}
# otherwise get a new clone of it
exec { "clone_meebot_repo":
command => "git clone https://github.com/openstack-ci/meetbot.git /opt/meetbot",
path => "/bin:/usr/bin",
onlyif => "test ! -d /opt/meetbot"
}
}
class meetbot {
stage { 'first': before => Stage['main'] }
class { 'vcs':
stage => 'first'
}
user { "meetbot":
shell => "/sbin/nologin",
home => "/var/lib/meetbot",
system => true,
gid => "meetbot",
require => Group["meetbot"]
}
group { "meetbot":
ensure => present
}
package { ['supybot', 'nginx', 'python-twisted']:
ensure => present
}
service { "nginx":
ensure => running,
hasrestart => true
}
file { "/var/lib/meetbot":
ensure => directory,
owner => 'meetbot',
require => User['meetbot']
}
file { "/usr/share/pyshared/supybot/plugins/MeetBot":
ensure => directory,
recurse => true,
source => "/opt/meetbot/MeetBot",
require => Package["supybot"]
}
file { "/etc/nginx/sites-enabled/default":
ensure => absent,
require => Package['nginx'],
notify => Service['nginx']
}
}