Commission / decommission Puppet nodes easily.
This module provides Bolt plans to commission / decommission Puppet nodes.
Use this module to setup commissioning / decommissioning plans tailored to your site. We ship two sample plans with the module: commission::commission
and commission::decommission
. These plans are site-agnostic and not too much opiniated to be used in any infrastructure. Use them to give a try to the module and as a template for your site-specific plans.
To setup site-specific plan for your ACME organization, start with your Bolt project:
romain@marvin % mkdir acme
romain@marvin % cd acme
romain@marvin ~/acme % bolt project init --modules opuscodium-commission acme
Installing project modules
→ Resolving module dependencies, this might take a moment
→ Writing Puppetfile at ~/acme/Puppetfile
→ Syncing modules from ~/acme/Puppetfile to ~/acme/.modules
→ Generating type references
Successfully synced modules from ~/acme/Puppetfile to ~/acme/.modules
romain@marvin ~/acme % mkdir -p plans
romain@marvin ~/acme % sed -e 's/commission::commission/acme::commission/' -e '/@api private/,+1d' < .modules/commission/plans/commission.pp > plans/commission.pp
romain@marvin ~/acme % bolt plan show
Plans
acme::commission Commission a node and connect it to the Puppet infrastructure
[...]
Edit the plans/commission.pp
plan to fit your site policies, requirements, etc. Feel free to hardcode the puppet server name, fetch data from PuppetDB, prompt the user for inputs, and so on… When done, setup a decommissioning plan in a similar fashion.
romain@marvin ~/acme % bolt plan run acme::commission -t node1.example.com,node2.example.com
romain@marvin ~/acme % bolt plan run acme::decommission -t node1.example.com,node2.example.com