Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How can I adjust a template to use custom variables that are delivered from each client?

Hi,

I am quite new to puppet and I want to determine what I have to do to make it work. Currently we are using package based configurations, and I want to change that to make things easier in the future. Following scenario:

We have an Active Directory and many Linux Clients that are using SSSD and Kerberos for authentication. In the sssd.conf is a parameter "ldapuri". The parameter has 2 servers as values. The servers itself are obtained with the command on the client side: host -N 2 -t SRV _ldap.tcp.rsint.net | grep -v NXDOMAIN | awk '{print $NF}' | sed 's/'net.'/'net'/g' > /tmp/$tmp Each line is written to a variable in the next step and pasted into the configuration file. The reason for doing this, each site of my company has other ldap servers and not all can access those in other countries.

Question is: How can I do that in a erb template for the sssd.conf? As far as I have learned I have to put variables in the erb template. But how can I assign the correct values to the variables on the puppet master, when these values are totally unknown to the master itself? Every help is appreciated :-).

How can I adjust a template to use custom variables that are delivered from each client?

Hi,

I am quite new to puppet and I want to determine what I have to do to make it work. Currently we are using package based configurations, and I want to change that to make things easier in the future. Following scenario:

We have an Active Directory and many Linux Clients that are using SSSD and Kerberos for authentication. In the sssd.conf is a parameter "ldapuri". "ldap_uri". The parameter has 2 servers as values. The servers itself are obtained with the command on the client side: side:

host -N 2 -t SRV _ldap.ldap.tcp.rsint.net | grep -v NXDOMAIN | awk '{print $NF}' | sed 's/'net.'/'net'/g' > /tmp/$tmp /tmp/$tmp

Each line is written to a variable in the next step and pasted into the configuration file. The reason for doing this, each site of my company has other ldap servers and not all can access those in other countries.

Question is: How can I do that in a erb template for the sssd.conf? As far as I have learned I have to put variables in the erb template. But how can I assign the correct values to the variables on the puppet master, when these values are totally unknown to the master itself? Every help is appreciated :-).

How can I adjust a template to use custom variables that are delivered from each client?

Hi,

I am quite new to puppet and I want to determine what I have to do to make it work. Currently we are using package based configurations, and I want to change that to make things easier in the future. Following scenario:

We have an Active Directory and many Linux Clients that are using SSSD and Kerberos for authentication. In the sssd.conf is a parameter "ldap_uri". The parameter has 2 servers as values. The servers itself are obtained with the command on the client side:

host -N 2 -t SRV ldap.tcp.rsint.net tcp.domain.net | grep -v NXDOMAIN | awk '{print $NF}' | sed 's/'net.'/'net'/g' > /tmp/$tmp

Each line is written to a variable in the next step and pasted into the configuration file. The reason for doing this, each site of my company has other ldap servers and not all can access those in other countries.

Question is: How can I do that in a erb template for the sssd.conf? As far as I have learned I have to put variables in the erb template. But how can I assign the correct values to the variables on the puppet master, when these values are totally unknown to the master itself? Every help is appreciated :-).