Puppet, Foreman, Facter, Mcollective
Puppet
I wanted to apply puppet classes to a node using a script, I started looking at the foreman REST API but stumbled upon the foreman_api ruby. I specified hostgroups in foreman and added puppet classes to the hostgroups. The idea is that I want to be able to change the hostgroups using a script.
Running things through irb this is what I came up with for changing the hostgroups.
#!/usr/bin/ruby
require 'rubygems'
require 'foreman_api'
hostname='node1.example.com'
hosts = ForemanApi::Resources::Host.new(
{
:base_url => '…
My puppet book was released July 25th on Packtpub.com
You can also grab a copy from Amazon or O'reilly
Contest! Win a copy of the book
August 14 - 21, 2014
Winners will be announced shortly, contest closed Thursday August 22 at midnight PDT
About the book
The book was…