Managing nodes

In Bolt, we have to explicitly list the nodes that we want to manage. We can do this via the --nodes command flag, or by providing an inventory file. An inventory file is a YAML file that contains groups of nodes, with configuration options already set. By default, an inventory file placed at ~/.puppetlabs/bolt/inventory.yaml will be used by Bolt. For this section, we'll only be targeting our Puppet Master, so I'll ensure that it is in the inventory file:

# ~/.puppetlabs/bolt/inventory.yaml---groups:  - name: puppetserver    nodes:    - pe-puppet-master.puppet.net    config:      transport: ssh      ssh:        user: root

Before I can run Bolt to that server, I'm going to need to ensure that my SSH key is available as the root user on that system. I'll ...

Get Mastering Puppet 5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.