|
106 | 106 | },
|
107 | 107 | }
|
108 | 108 |
|
| 109 | + $precheck_results = run_task('peadm::precheck', $all_targets) |
| 110 | + $platform = $precheck_results.first['platform'] # Assume the platform of the first result correct |
| 111 | + |
109 | 112 | # Validate that the name given for each system is both a resolvable name AND
|
110 |
| - # the configured hostname. |
111 |
| - run_task('peadm::hostname', $all_targets).each |$result| { |
| 113 | + # the configured hostname, and that all systems return the same platform |
| 114 | + $precheck_results.each |$result| { |
112 | 115 | if $result.target.name != $result['hostname'] {
|
113 | 116 | fail_plan("Hostname / DNS name mismatch: target ${result.target.name} reports '${result['hostname']}'")
|
114 | 117 | }
|
| 118 | + if $result['platform'] != $platform { |
| 119 | + fail_plan("Platform mismatch: target ${result.target.name} reports '${result['platform']}; expected ${platform}'") |
| 120 | + } |
115 | 121 | }
|
116 | 122 |
|
117 | 123 | # Generate all the needed pe.conf files
|
|
143 | 149 | peadm::file_content_upload($puppetdb_database_replica_pe_conf, '/tmp/pe.conf', $puppetdb_database_replica_target)
|
144 | 150 |
|
145 | 151 | # Download the PE tarball and send it to the nodes that need it
|
146 |
| - $pe_tarball_name = "puppet-enterprise-${version}-el-7-x86_64.tar.gz" |
| 152 | + $pe_tarball_name = "puppet-enterprise-${version}-${platform}.tar.gz" |
147 | 153 | $local_tarball_path = "${stagingdir}/${pe_tarball_name}"
|
148 | 154 | $upload_tarball_path = "/tmp/${pe_tarball_name}"
|
149 | 155 |
|
150 | 156 | run_plan('peadm::util::retrieve_and_upload', $pe_installer_targets,
|
151 |
| - source => "https://s3.amazonaws.com/pe-builds/released/${version}/puppet-enterprise-${version}-el-7-x86_64.tar.gz", |
| 157 | + source => "https://s3.amazonaws.com/pe-builds/released/${version}/puppet-enterprise-${version}-${platform}.tar.gz", |
152 | 158 | local_path => $local_tarball_path,
|
153 | 159 | upload_path => $upload_tarball_path,
|
154 | 160 | )
|
|
0 commit comments