Skip to content

Commit 9fd519e

Browse files
committed
Revert removal of Bolt GH-1244 workaround
Seems like the workaround is still needed. Will investigate, since Bolt GH-1244 is supposed to be resolved.
1 parent 43afc64 commit 9fd519e

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

plans/action/configure.pp

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,17 @@
5959

6060
# Set up the console node groups to configure the various hosts in their roles
6161

62+
# Pending resolution of Bolt GH-1244, Target objects and their methods are
63+
# not accessible inside apply() blocks. Work around the limitation for now
64+
# by using string variables calculated outside the apply block. The
65+
# commented-out values should be used once GH-1244 is resolved.
66+
67+
# WORKAROUND: GH-1244
68+
$master_host_string = $master_target.peadm::target_name()
69+
$master_replica_host_string = $master_replica_target.peadm::target_name()
70+
$puppetdb_database_host_string = $puppetdb_database_target.peadm::target_name()
71+
$puppetdb_database_replica_host_string = $puppetdb_database_replica_target.peadm::target_name()
72+
6273
apply($master_target) {
6374
# Necessary to give the sandboxed Puppet executor the configuration
6475
# necessary to connect to the classifier`
@@ -67,15 +78,16 @@
6778
mode => '0644',
6879
path => Deferred('peadm::node_manager_yaml_location'),
6980
content => epp('peadm/node_manager.yaml.epp', {
70-
server => $master_target.peadm::target_name(),
81+
server => $master_host_string,
7182
}),
7283
}
7384

7485
class { 'peadm::setup::node_manager':
75-
master_host => $master_target.peadm::target_name(),
76-
master_replica_host => $master_replica_target.peadm::target_name(),
77-
puppetdb_database_host => $puppetdb_database_target.peadm::target_name(),
78-
puppetdb_database_replica_host => $puppetdb_database_replica_target.peadm::target_name(),
86+
# WORKAROUND: GH-1244
87+
master_host => $master_host_string, # $master_target.peadm::target_name(),
88+
master_replica_host => $master_replica_host_string, # $master_replica_target.peadm::target_name(),
89+
puppetdb_database_host => $puppetdb_database_host_string, # $puppetdb_database_target.peadm::target_name(),
90+
puppetdb_database_replica_host => $puppetdb_database_replica_host_string, # $puppetdb_database_replica_target.peadm::target_name(),
7991
compiler_pool_address => $compiler_pool_address,
8092
require => File['node_manager.yaml'],
8193
}

0 commit comments

Comments
 (0)