[puppet] Install agent on target node

This commit is contained in:
Mike Scherbakov 2012-11-03 03:08:59 +04:00
parent 0dcc6654f9
commit 9ff5ed94a4
6 changed files with 11 additions and 6 deletions

View File

@ -1 +1 @@
*/5 * * * * root flock -w 0 -o /var/lock/agent.lock -c "/opt/nailgun/bin/agent > /var/log/nailgun-agent.log 2>&1"
*/5 * * * * root flock -w 0 -o /var/lock/agent.lock -c "/opt/nailgun/bin/agent > /var/log/nailgun-agent.log 2>&1"

View File

@ -25,7 +25,7 @@ node default {
$repo_root = "/var/www/nailgun"
$pip_repo = "/var/www/nailgun/eggs"
$gem_source = "http://localhost:8080/gems/"
$gem_source = "http://$ipaddress:8080/gems/"
class { "nailgun":

View File

@ -125,6 +125,7 @@ class nailgun(
cobbler_password => "cobbler",
centos_iso => $centos_iso,
centos_repos => $centos_repos,
gem_source => $gem_source,
}
class { "nailgun::pm":

View File

@ -1 +0,0 @@
echo 'flock -w 0 -o /var/lock/agent.lock -c "/opt/nailgun/bin/agent > /var/log/nailgun-agent.log 2>&1"' >> /etc/rc.local

View File

@ -106,6 +106,9 @@ crontabs
cronie
ruby-augeas
ntp
ruby-devel
make
gcc
nailgun-agent
# COBBLER EMBEDDED SNIPPET: 'puppet_install_if_enabled'
@ -121,6 +124,9 @@ $SNIPPET('mcollective_install_if_enabled')
# INSTALLATION ITSELF COMPLETED
%post
gem install ohai httpclient json --source <%= gem_source %> --no-ri --no-rdoc
# COBBLER EMBEDDED SNIPPET: 'log_ks_post'
# CONFIGURES %post LOGGING
$SNIPPET('log_ks_post')
@ -150,9 +156,8 @@ $SNIPPET('mcollective_conf')
# CONFIGURES NTPD POOL TO MASTER NODE
$SNIPPET('ntp_to_masternode')
# SNIPPET: 'agent_to_rclocal'
# ADD NAILGUN AGENT TO RC.LOCAL
$SNIPPET('agent_to_rclocal')
# Let's not to use separate snippet for just one line of code. Complexity eats my time.
echo 'flock -w 0 -o /var/lock/agent.lock -c "/opt/nailgun/bin/agent > /var/log/nailgun-agent.log 2>&1"' >> /etc/rc.local
# COBBLER EMBEDDED SNIPPET: 'kickstart_done'
# DISABLES PXE BOOTING