Ask Your Question

searching a way to change apache vhost file according changes on vhost file on another cilent

asked 2014-12-04 04:04:30 -0600

i have to clients(2 apache servers) when i make some changes on vhost on client 1 puppet will sync the changes to the client 2

i would like to know if there is way to do it

thank you !

edit retag flag offensive close merge delete


That's not the intended model for Puppet. You could use a scheduled rsync for that. Puppet would be best used to manage the vhost on both clients and you make the desired changes on the Puppet Master.

Aaron Copley gravatar imageAaron Copley ( 2014-12-04 10:29:12 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2014-12-04 08:14:59 -0600

jeffreyw gravatar image

updated 2014-12-04 10:07:34 -0600

Hello, I am pretty new to Puppet.. as I just got things up and running a few days ago.... but I hope my information can help you!

In your directory:


You should have a site.pp file

If you want your configurations to effect your entire site (all clients), have the following configuration in your:

node 'default' {      #the default node applies your classes to all of your nodes
  include <class_name>

If you want your configurations to only effect certain clients, have the following configuration in your:

node 'hostname_of_client_1' {
  include <class_name_1>
node 'hostname_of_client_2' {
  include <class_name_2>
  include <class_name_3>

You could also have comma separated nodes too:

node 'hostname_of_client_1', 'hostname_of_client_2' {
  include <class_name_1>
  include <class_name_4>

If it yells at you about:

Error: Could not find default node or by name with ' '

I just include a blank default node like this:

node 'default' { }
node 'hostname_of_client_1' {
  include <class_name_1>
edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

1 follower


Asked: 2014-12-04 04:04:30 -0600

Seen: 57 times

Last updated: Dec 04 '14