Ask Your Question

Generate script for manually maintained node

asked 2013-04-01 11:29:32 -0600

dustyburwell gravatar image

We're using foreman and have several nodes that are maintained by it. For one reason or another, we have a few nodes that will be unable to communicate with foreman and will need to be maintained manually. The way we've done that so far is to build a .pp file for the node based on the yaml export for a similar node and copy that, along with the other necessary module files and packages, to the manually maintained node and run puppet apply against it.

Is there an easy way to use foreman or anything else to generate ... (more)

edit retag flag offensive close merge delete


I take the system can't communicate with the puppetmaster either/same host?

domcleal gravatar imagedomcleal ( 2013-04-01 16:23:15 -0600 )edit

Correct, it's the same host.

dustyburwell gravatar imagedustyburwell ( 2013-04-01 16:49:43 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2013-04-01 16:39:34 -0600

domcleal gravatar image

You can avoid converting the YAML to a manifest by using a simple ENC script with puppet apply. In the same way as a puppetmaster can call out to Foreman via the ENC script (/etc/puppet/node.rb usually), apply can call a script which could reference a copy of the YAML file you prepared earlier.

$ cat /tmp/ 
  puppetmaster: puppet
  root_pw: xybxa6JUkz63w
  - foo
environment: production

This is the simple ENC script and Puppet config:

$ cat /tmp/
exec cat /tmp/${1}.yaml

$ cat /tmp/puppet.conf 
node_terminus = exec
external_nodes ...
edit flag offensive delete link more


Cool, I'll try this out tomorrow! Thanks.

dustyburwell gravatar imagedustyburwell ( 2013-04-01 16:51:06 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2013-04-01 11:29:32 -0600

Seen: 697 times

Last updated: Apr 01 '13