@@ -74,6 +74,60 @@ bolt task run openvox_bootstrap::install_build_artifact \
7474 --run-as root
7575` ` `
7676
77+ # ## openvox_bootstrap::configure
78+
79+ The openvox_bootstrap::configure task can be used to provide very
80+ basic initial configuration for the openvox agent.
81+
82+ It does not install the agent. Run openvox_bootstrap::install first.
83+ Since the agent service is installed stopped, configuration can
84+ be laid down before the first run begins the certificate request
85+ process.
86+
87+ It provides the following support :
88+
89+ * laying down an initial puppet.conf (primary use case being to set
90+ the [server] parameter to point to the openvox-server).
91+ * creating a [csr_attributes.yaml] file for the agent to use when
92+ generating a CSR for use with autosigning scripts and to provide
93+ extension data to the generated certificate.
94+ * ensuring the `puppet` service is in a preferred state.
95+
96+ NOTE : the csr_attributes.yaml will overwrite any pre-existing files,
97+ but settings for puppet.conf will be merged into an existing file if
98+ present.
99+
100+ With an example params.json file like this :
101+
102+ ` ` ` json
103+ {
104+ "puppet_conf": {
105+ "main": {
106+ "server": "puppetserver.foo"
107+ }
108+ },
109+ "csr_attributes": {
110+ "custom_attributes": {
111+ "1.2.840.113549.1.9.7": "password"
112+ },
113+ "extension_requests": {
114+ "pp_role": "thing1"
115+ }
116+ },
117+ "puppet_service_running": true,
118+ "puppet_service_enabled": true
119+ }
120+ ` ` `
121+
122+ You can run the task like this :
123+
124+ ` ` ` sh
125+ bolt task run openvox_bootstrap::configure \
126+ --targets <target> \
127+ --params @params.json \
128+ --run-as root
129+ ` ` `
130+
77131# # Reference
78132
79133See [REFERENCE.md](./REFERENCE.md) for the generated reference doc.
@@ -117,3 +171,5 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
117171[puppet_agent::install tasks] : https://github.com/puppetlabs/puppetlabs-puppet_agent/tree/main?tab=readme-ov-file#puppet_agentinstall
118172[apply_prep] : https://www.puppet.com/docs/bolt/latest/plan_functions#apply-prep
119173[puppet_library] : https://www.puppet.com/docs/bolt/latest/using_plugins#puppet-library-plugins
174+ [server] : https://github.com/puppetlabs/puppet/blob/main/references/configuration.md#server
175+ [csr_attributes.yaml] : https://help.puppet.com/core/current/Content/PuppetCore/config_file_csr_attributes.htm
0 commit comments