In this case I needed a way to script adding a lot of nodes to a Puppet Console node group. Later versions of Puppet Enterprise have the Node Classifier Endpoints, but in this environment we were running 3.2.3. You can use the Console Rake API instead.
/opt/puppet/bin/rake -f /opt/puppet/share/puppet-dashboard/Rakefile RAILS_ENV=production node:addgroup['myhost.example.com','mygroup']
cat newhosts | xargs -I {} /opt/puppet/bin/rake -f /opt/puppet/share/puppet-dashboard/Rakefile RAILS_ENV=production node:addgroup['{}','mygroup']
No comments:
Post a Comment