From 3cc22fdd2e390d47ef6808986fa054ed0e515739 Mon Sep 17 00:00:00 2001 From: Oleksandr Ursu Date: Fri, 27 Sep 2024 01:46:19 +0200 Subject: [PATCH] Updated README --- README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/README.md b/README.md index 81e5928..db2d12d 100644 --- a/README.md +++ b/README.md @@ -79,4 +79,28 @@ To configure a custom cache directory for `r10k` instead of the default (`/var/c To schedule the `r10k` command in `cron`, use the `puppet::r10k_crontab_setup` flag. Set this flag to `true` to enable the setup of `r10k` in the crontab. +### Puppet Agent Bootstrap + +The `puppet::agent::bootstrap` class is responsible for bootstrapping a Puppet node. It performs the following steps: + +1. **First Run:** + It executes the `puppet agent --test` command to initiate the creation of a Puppet private key and request a certificate from the Puppet server. + +2. **Subsequent Runs:** + On subsequent executions, it attempts to download the certificate from the Puppet server. If the certificate is not yet available, the agent will continue to attempt fetching it on each run until the certificate is successfully retrieved. + +3. **Handling `certname`:** + If a `certname` is specified during the certificate request, the private key and certificate will be propagated into the appropriate locations using the `fqdn` (fully qualified domain name), if it differs from `certname`. + +The Bolt plan `puppet::bootstrap` is available to automate the setup of Puppet agents on nodes. This plan performs the following tasks: + +1. **Install Puppet Agent:** + It uses the `puppet::agent::install` Bolt plan to install the Puppet agent on the target node. + +2. **Configure Puppet:** + It configures the `puppet.conf` file with the necessary settings, including the Puppet server name and, if provided, the `certname`. + +3. **Run Bootstrap:** + Finally, it runs the `puppet::agent::bootstrap` Bolt plan to initiate the Puppet agent bootstrap process, which handles certificate requests and private key creation. + ## Limitations \ No newline at end of file