Skip to content

Commit 20eb2cb

Browse files
committed
(gh-26) Update README with some notes on the configure task
1 parent 0e87467 commit 20eb2cb

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

README.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,59 @@ 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: both the puppet.conf and csr_attributes.yaml will overwrite any
97+
pre-existing files. This task does not merge any configuration.
98+
99+
With an example params.json file like this:
100+
101+
```json
102+
{
103+
"puppet_conf": {
104+
"main": {
105+
"server": "puppetserver.foo"
106+
}
107+
},
108+
"csr_attributes": {
109+
"custom_attributes": {
110+
"1.2.840.113549.1.9.7": "password"
111+
},
112+
"extension_requests": {
113+
"pp_role": "thing1"
114+
}
115+
},
116+
"puppet_service_running": true,
117+
"puppet_service_enabled": true
118+
}
119+
```
120+
121+
You can run the task like this:
122+
123+
```sh
124+
bolt task run openvox_bootstrap::configure \
125+
--targets <target> \
126+
--params @params.json \
127+
--run-as root
128+
```
129+
77130
## Reference
78131

79132
See [REFERENCE.md](./REFERENCE.md) for the generated reference doc.
@@ -117,3 +170,5 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
117170
[puppet_agent::install tasks]: https://github.com/puppetlabs/puppetlabs-puppet_agent/tree/main?tab=readme-ov-file#puppet_agentinstall
118171
[apply_prep]: https://www.puppet.com/docs/bolt/latest/plan_functions#apply-prep
119172
[puppet_library]: https://www.puppet.com/docs/bolt/latest/using_plugins#puppet-library-plugins
173+
[server]: https://github.com/puppetlabs/puppet/blob/main/references/configuration.md#server
174+
[csr_attributes.yaml]: https://help.puppet.com/core/current/Content/PuppetCore/config_file_csr_attributes.htm

0 commit comments

Comments
 (0)