|
148 | 148 | 'puppet_enterprise::database_host' => $puppetdb_database_replica_target.peadm::target_name(),
|
149 | 149 | } + $pe_conf_data)
|
150 | 150 |
|
151 |
| - # Upload the pe.conf files to the hosts that need them |
152 |
| - peadm::file_content_upload($master_pe_conf, '/tmp/pe.conf', $master_target) |
153 |
| - peadm::file_content_upload($puppetdb_database_pe_conf, '/tmp/pe.conf', $puppetdb_database_target) |
154 |
| - peadm::file_content_upload($puppetdb_database_replica_pe_conf, '/tmp/pe.conf', $puppetdb_database_replica_target) |
| 151 | + # Upload the pe.conf files to the hosts that need them, and ensure correctly |
| 152 | + # configured certnames. Right now for these hosts we need to do that by |
| 153 | + # staging a puppet.conf file. |
| 154 | + ['master', 'puppetdb_database', 'puppetdb_database_replica'].each |$var| { |
| 155 | + $target = getvar("${var}_target") |
| 156 | + $pe_conf = getvar("${var}_pe_conf") |
| 157 | + |
| 158 | + peadm::file_content_upload($pe_conf, '/tmp/pe.conf', $target) |
| 159 | + run_task('peadm::mkdir_p_file', $target, |
| 160 | + path => '/etc/puppetlabs/puppet/puppet.conf', |
| 161 | + content => @("HEREDOC"), |
| 162 | + [main] |
| 163 | + certname = ${target.peadm::target_name()} |
| 164 | + | HEREDOC |
| 165 | + ) |
| 166 | + } |
155 | 167 |
|
156 | 168 | # Download the PE tarball and send it to the nodes that need it
|
157 | 169 | $pe_tarball_name = "puppet-enterprise-${version}-${platform}.tar.gz"
|
|
0 commit comments