Am Montag, den 16.09.2019, 15:53 +0200 schrieb Albert Shih:
I would like to know if it's possible (for dev/test) to pass a value for
some hiera variable through the puppet agent cli ?
For exemple I got a in my fqdn.yaml
status: production
but I would like to do something like
puppet agent -vt --???? status: dev
Is that possible ?
Not sure. However, here's how I do this:
1. Setup a "development" environment on your master
2. On the development agents put "environment = development" into their
puppet.conf
3. Make sure your hiera.yaml (on the master) contains an entry for the
environment in its ":hierarchy:" section, like "environment/%{environment}",
somewhere before "common".
4. In your hiera directory (where your common.yaml is), create a new file
"environment/development.yaml" and put your values into it.
This, combined with putting your Puppet-related stuff into a Git repository,
allows you to easily setup different environments on your Puppet master by
cloning the repository multiple times and checking out different branches.
HTH...
Dirk
--
Dirk Heinrichs
Senior Systems Engineer, Delivery Pipeline
OpenText ™ Discovery | Recommind
Phone: +49 2226 15966 18
Email: [email protected]<mailto:[email protected]>
Website: www.recommind.de
Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach
Vertretungsberechtigte Geschäftsführer Gordon Davies, Madhu Ranganathan,
Christian Waida, Registergericht Amtsgericht Bonn, Registernummer HRB 10646
This e-mail may contain confidential and/or privileged information. If you are
not the intended recipient (or have received this e-mail in error) please
notify the sender immediately and destroy this e-mail. Any unauthorized
copying, disclosure or distribution of the material in this e-mail is strictly
forbidden
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen.
Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten
haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail.
Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail sind nicht
gestattet.
--
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/b00c3d3a5869532daecef840919e5de80c49c563.camel%40opentext.com.