Skip to content

Commit ab9ce56

Browse files
committed
Merge branch 'puppet-service-ensure'
2 parents a716b55 + e547a55 commit ab9ce56

File tree

4 files changed

+21
-2
lines changed

4 files changed

+21
-2
lines changed

Diff for: plans/action/configure.pp

+9
Original file line numberDiff line numberDiff line change
@@ -146,5 +146,14 @@
146146
)
147147
}
148148

149+
# Ensure Puppet agent service is running now that configuration is complete
150+
run_command('systemctl start puppet', peadm::flatten_compact([
151+
$master_target,
152+
$master_replica_target,
153+
$puppetdb_database_target,
154+
$puppetdb_database_replica_target,
155+
$compiler_targets,
156+
]))
157+
149158
return("Configuration of Puppet Enterprise ${arch['architecture']} succeeded.")
150159
}

Diff for: plans/action/install.pp

+4-2
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@
205205
_catch_errors => $shortcircuit_puppetdb,
206206
tarball => $upload_tarball_path,
207207
peconf => '/tmp/pe.conf',
208+
puppet_service_ensure => 'stopped',
208209
shortcircuit_puppetdb => $shortcircuit_puppetdb,
209210
)
210211
out::message("Finished: task peadm::pe_install on ${master_target[0].name}")
@@ -232,8 +233,9 @@
232233
233234
# Run the PE installer on the puppetdb database hosts
234235
run_task('peadm::pe_install', $database_targets,
235-
tarball => $upload_tarball_path,
236-
peconf => '/tmp/pe.conf',
236+
tarball => $upload_tarball_path,
237+
peconf => '/tmp/pe.conf',
238+
puppet_service_ensure => 'stopped',
237239
)
238240
239241
# Now that the main PuppetDB database node is ready, finish priming the

Diff for: tasks/pe_install.json

+4
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
"shortcircuit_puppetdb": {
1313
"type": "Optional[Boolean]",
1414
"description": "If true, during install, configure PuppetDB to short-circuit its startup"
15+
},
16+
"puppet_service_ensure": {
17+
"type": "Optional[Enum['stopped']]",
18+
"description": "If 'stopped', ensure the Puppet agent is not running when install completes"
1519
}
1620
},
1721
"input_method": "environment",

Diff for: tasks/pe_install.sh

+4
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,7 @@ if [ "$PT_shortcircuit_puppetdb" = "true" ]; then
3131
rm /etc/systemd/system/pe-puppetdb.service.d/10-shortcircuit.conf
3232
systemctl daemon-reload
3333
fi
34+
35+
if [ "$PT_puppet_service_ensure" = "stopped" ]; then
36+
systemctl stop puppet.service
37+
fi

0 commit comments

Comments
 (0)