Related to https://github.com/wazuh/wazuh-puppet
When distiburing agent keys via puppet, the id generated by fqdn_rand() are not unique. With large number of hosts there are id conflicts.
This puppet external node classifier is simple python list that provides hostname unique ids in default wazuh range: 1 - 14000 to be used by puppet module
- Drop file into
/var/lib/puppet/wazuhenc.py
- Add to your puppet master config file
puppet.conf
:
[master]
(...)
node_terminus = exec
external_nodes = /usr/bin/flock -w 5 /var/lib/puppet/wazuhenc.lock /var/lib/puppet/wazuhenc.py
Include the code
class { '::wazuh::client':
agent_name => $::fqdn,
agent_id => $::ossec_agent_id,
(...)
}