Set master hostname in puppet.conf during install

Adds another ini_setting resource to create an [agent] block in
/etc/puppet/puppet.conf and set the puppet master hostname to the
current hostname.  This will only be activated on build-server roles
and the all_in_one scenario.  Without this it's necessary to specify
the puppet master hostname each time puppet agent is run.

Change-Id: Ic6832ebec44e198e26b3b3553b315ead8e93feb5
Closes-Bug: 1285307
This commit is contained in:
Clayton O'Neill
2014-02-26 11:13:21 -08:00
parent 2c1f8208e3
commit b17f7237bd

View File

@@ -96,6 +96,15 @@ if $::puppet_run_mode != 'agent' {
value => 'scenario',
require => Package['puppet'],
}
ini_setting {'puppetmastername':
ensure => present,
path => '/etc/puppet/puppet.conf',
section => 'agent',
setting => 'server',
value => "${::hostname}.${::build_server_domain_name}",
require => Package['puppet'],
}
}
# Lay down a file that can be used for subsequent runs to puppet. Often, the