[rudder-users] Deploy specific files by node with 1 directive
Nicolas Charles
nicolas.charles at normation.com
Wed Nov 19 19:52:46 CET 2014
Hi Benoit,
For your first use case, you can use the variables
${rudder.node.hostname} and ${rudder.node.id} 'see
http://www.rudder-project.org/foswiki/System/ContextedVariables ) that
would refer to the hostname and node id.
so you could create one file per node, and copy it with Copy from the
shared folder
Problem is that you need to have the file existing when you add new
nodes into Rudder. As you pointed, there is no "default" for copy (you
are probably refering to the method called single copy nirvana in
CFEngine), and it is not implemented as it "hides" the intent of the
configuration
For the Postgres case, i'd define a Group that contains all nodes that
have default file, and others for specific config file, and then use the
"Define generic variable" to define where to copy from the file, and use
the defined variable in the path of the file to copy from.
Does it help?
Nicolas
Le 19/11/2014 18:35, Benoit LAURENT a écrit :
> Hello,
>
> I would like deploy with configuration files in my machine.
> But if I used Rudder I must create 1 rule for each machine.
> I would like to introduce to directives the hostname version.
>
>
> For example:
>
> In my /var/rudder/shared-files/ I commit one directory by hostname
> and I put in configuration files:
> tree shared-files
> shared-files
> host1
> mysql.conf
> host3
> babla.conf
> postgresql.conf
> hostname43
> And after I create directive "copy shared file." with copy from
> shared-files/${HOSTNAME/UUID}/* TO /etc/rudder/conf/ .
>
>
> Other raisoning, I would like to copy to all postgres node groups same
> files by "role":
> shared-files
> default <= defaut conf for all nodes
> mysql.conf
> host3 <= errase conf for host3 node
> mysql.conf
>
> And after I create directive "copy shared file." with copy from
> shared-files/${AUTOPATH}/* TO /etc/rudder/conf/ and rudder try to
> copy from shared-files/host3 and if does not exists,
> shared-files/default .
>
>
> It it an example. And I dont know if it is a good raisoning: is it
> possible to proceed with other method ?
>
>
> Regards,
> Benoit
> _______________________________________________
> rudder-users mailing list
> rudder-users at lists.rudder-project.org
> http://www.rudder-project.org/mailman/listinfo/rudder-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.rudder-project.org/pipermail/rudder-users/attachments/20141119/bb482b64/attachment.html>
More information about the rudder-users
mailing list