I want all my puppet mannaged hosts to have a list of these hosts in a configuration file. My first idea (which might not be a good one) is to use a template file to insert the list of hosts into the good configuration file.
When a new host is configured, puppet will compute the template and the new host will get a proper configuration file.
But what about the other hosts ? The template file do not change so puppet will not want to re-propagate it. So I guess all the other hosts won't know about the new list of hosts.
The precise use case is to whitelist my hosts in /etc/ssh/sshd_config :
AllowUsers: root@host1 root@host2 ... root@newhost
The template reaches for the SQL ENC to get the list of nodes.
Any hint ?