The Puppet agent daemon is disabled on some of your nodes. You'd like to know which nodes are enabled and which nodes are disabled.
Version and installation information
Puppet version: 4.0 to 6.0
Solution
Identify which nodes are enabled and which nodes are disabled by a running task from the support_tasks
module.
Before you begin: Install the puppetlabs-support_tasks
module. To use the tasks in the puppetlabs-support_tasks
module with Puppet, install Bolt on a workstation.
Learn more about:
Follow these steps to run the task:
-
On the command line, create a file called
inventory.txt
with a list of the nodes you'd like to check. For example:winrm://node1-oss-env.platform9.puppet.net winrm://node2-oss-env.platform9.puppet.net winrm://node3-oss-env.platform9.puppet.net winrm://node4-oss-env.platform9.puppet.net winrm://node5-oss-env.platform9.puppet.net winrm://node6-oss-env.platform9.puppet.net winrm://node7-oss-env.platform9.puppet.net ssh://node8-oss-env.platform9.puppet.net ssh://node9-oss-env.platform9.puppet.net ssh://node10-oss-env.platform9.puppet.net ssh://node11-oss-env.platform9.puppet.net ssh://node12-oss-env.platform9.puppet.net ssh://node13-oss-env.platform9.puppet.net
-
Create a list of disabled nodes in a file (
nodefile.txt
) by using Bolt to run the taskst0285_find_disabled_agents
. For example:bolt task run support_tasks::st0285_find_disabled_agents --targets @inventory.txt c --private_key <PATH TO KEY, IF REQUIRED> | grep Finished | awk '{printf "%s%s",sep,$NF; sep=",\n"}' > nodefile.txt
Example output
The output for enabled nodes contains an error so that you can sort enabled and disabled nodes:
Started on pe-201813-master.platform9.puppet.net ...
Failed on pe-201813-master.platform9.puppet.net
Error: Task finished with exit-code 1
STDOUT:
Puppet agent is enabled
Job failed. 1 node failed, 0 nodes skipped, 0 nodes succeeded.
Duration: 0 sec
The output for a disabled node:
Started on pe-201813-master.platform9.puppet.net ...
Finished on node pe-201813-master.platform9.puppet.net
STDOUT:
Puppet agent is disabled
Job completed. 1/1 nodes succeeded.
Duration: 0 sec
Comments
0 comments
Please sign in to leave a comment.