Am Samstag, 28. April 2018 03:31:24 UTC+2 schrieb Joaquin Menchaca:
>
> Hello Puppeteers,
>
> Relearning Puppet (converting Ansible, Chef knowledge), not sure best 
> approach for this.  How can I configure systems based on state of another 
> system?   Essentially, I would use a tool like Terraform to bring up 
> systems.  When their IP addresses are available, I would then use that 
> information (their IP address) to configure other systems.
>
> I have two simple use cases:
>
>    1. local repository, and if up and available, want to configure all 
>    clients, e.g. java clients, to use this system (such as /etc/hosts with 
>    download.oracle.com)
>    2. elastic search cluster where the elasticsearch.yml has ip addresses 
>    of all nodes within the cluster.
>
> you could report to puppetdb and query it in your manifests (puppet pql) . 
but this introduces a circular dependency as you need to run puppet before 
having data in puppetdb - so this wouldn't configure your cluster in the 
first run. And if you have many severs which need ip adresses of the other 
servers then different puppet runs will produce different config files and 
maybe restart the service often. I personally would not do it.

Another way is to use the roles/profiles pattern with hiera integrated into 
the environment or module and add the data to hiera. But it requires that 
you know your ip addresses (or dns names) before the deployment and that 
you're able to release code to a puppet environment as you need it.

Or you could take a look at bolt/puppet tasks, or if you're on PE then 
there is the orchestrator (which i have not used).

It really depends on how the state of your puppet infrastructure is. :-)


- Thomas

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/83e27038-5f42-4a1d-bdfd-fe6bdb2088c2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to