Ask Your Question
0

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

Comments

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
0

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:

/etc/puppet/manifests/

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:

#/etc/puppet/manifests/site.pp
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:

#/etc/puppet/manifests/site.pp
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:

#/etc/puppet/manifests/site.pp
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:

#/etc/puppet/manifests/site.pp
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

Stats

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

Seen: 55 times

Last updated: Dec 04 '14