Skip to content

Commit

Permalink
Corrected bolt plan puppet::bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Ursu committed Feb 25, 2025
1 parent 0c98f8a commit 05ca56a
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 22 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ node on Puppet server.

**Known Issues**

## Release 0.33.0
## Release 0.33.1

**Features**

Expand All @@ -611,5 +611,6 @@ node on Puppet server.
* Disabled compatibility mode for Ubuntu as vendor packages are already available
* Fixed plan `puppet::cert::clean`
* Fixed `apt` module dependency version
* Corrected Bolt plan `puppet::bootstrap`

**Known Issues**
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aursu-puppet",
"version": "0.33.0",
"version": "0.33.1",
"author": "aursu",
"summary": "Puppet server installation and setup",
"license": "Apache-2.0",
Expand Down
40 changes: 20 additions & 20 deletions plans/bootstrap.pp
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,32 @@
) {
run_plan(facts, $targets)

run_plan(puppet::agent::install, $targets, collection => $collection)
get_targets($targets).each |$target| {
run_plan(puppet::agent::install, $target, collection => $collection)

$apply_results = apply($targets) {
class { 'puppet::globals':
platform_name => $collection,
}
$apply_results = apply($target) {
class { 'puppet::globals':
platform_name => $collection,
}

include puppet
include puppet

class { 'puppet::agent::config':
server => $server,
certname => $certname,
}
class { 'puppet::agent::config':
server => $server,
certname => $certname,
}

class { 'puppet::agent::bootstrap':
certname => $certname,
require => Class['puppet::agent::config'],
class { 'puppet::agent::bootstrap':
certname => $certname,
require => Class['puppet::agent::config'],
}
}
}

# Print log messages from the report
$apply_results.each |$result| {
$result.report['logs'].each |$log| {
out::message("${log['level'].capitalize}: ${log['source']}: ${log['message']}")
# Print log messages from the report
$apply_results.each |$result| {
$result.report['logs'].each |$log| {
out::message("${log['level'].capitalize}: ${log['source']}: ${log['message']}")
}
}
}

return $apply_results
}

0 comments on commit 05ca56a

Please sign in to comment.