Added puppet::opencollab
This commit is contained in:
parent
592d69eb64
commit
1b3fc4a90a
1 changed files with 56 additions and 0 deletions
|
@ -354,3 +354,59 @@ class puppet::server inherits puppet::client {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Install and configure opencollab-puppet-uploader.
|
||||||
|
#
|
||||||
|
# === Global variables
|
||||||
|
#
|
||||||
|
# $puppet_opencollab_url:
|
||||||
|
# Wiki URL.
|
||||||
|
#
|
||||||
|
# $puppet_opencollab_user:
|
||||||
|
# Wiki user.
|
||||||
|
#
|
||||||
|
# $puppet_opencollab_pass:
|
||||||
|
# Wiki password.
|
||||||
|
#
|
||||||
|
class puppet::opencollab {
|
||||||
|
|
||||||
|
if !$puppet_opencollab_url {
|
||||||
|
fail("\$puppet_opencollab_url must be set.")
|
||||||
|
}
|
||||||
|
if !$puppet_opencollab_user {
|
||||||
|
fail("\$puppet_opencollab_user must be set.")
|
||||||
|
}
|
||||||
|
if !$puppet_opencollab_pass {
|
||||||
|
fail("\$puppet_opencollab_pass must be set.")
|
||||||
|
}
|
||||||
|
|
||||||
|
include wiki::opencollab
|
||||||
|
|
||||||
|
package { "PyYAML":
|
||||||
|
name => $operatingsystem ? {
|
||||||
|
debian => "python-yaml",
|
||||||
|
ubuntu => "python-yaml",
|
||||||
|
default => "PyYAML",
|
||||||
|
},
|
||||||
|
ensure => installed,
|
||||||
|
before => Class["wiki::opencollab"],
|
||||||
|
}
|
||||||
|
|
||||||
|
file { "/etc/puppet/opencollab.conf":
|
||||||
|
ensure => present,
|
||||||
|
mode => 0600,
|
||||||
|
owner => root,
|
||||||
|
group => root,
|
||||||
|
content => "[creds]\nurl = ${puppet_opencollab_url}\nusername = ${puppet_opencollab_user}\npassword = ${puppet_opencollab_pass}\n",
|
||||||
|
}
|
||||||
|
|
||||||
|
cron { "opencollab-puppet-uploader":
|
||||||
|
ensure => present,
|
||||||
|
command => "/usr/bin/opencollab-puppet-uploader -c /etc/puppet/opencollab.conf /var/lib/puppet/yaml/facts/*.yaml",
|
||||||
|
user => root,
|
||||||
|
minute => 0,
|
||||||
|
require => [ Class["wiki::opencollab"], File["/etc/puppet/opencollab.conf"] ],
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue