-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello

I'm in the progress of refactoring a lot of our old puppet manifests
to finally get rid of all this global variables (we where young and... )

Now some of the settings are used in more then one class.

Example for one domain in hiera:

sssd::ldap_servers:
  - 'ldap://ldap1.example.com/'
  - 'ldap://ldap2.example.com/'

openldap::client::servers:
  - 'ldap://ldap1.example.com/'
  - 'ldap://ldap2.example.com/'

which i could simplify with anchors:

ldap_servers: &ldap_servers
  - 'ldap://ldap1.example.com/'
  - 'ldap://ldap2.example.com/'

sssd::ldap_servers: *ldap_servers
openldap::client::servers: *ldap_servers

A bit less redundancy than before, but there is still another problem.
If i want to set something else in a different domain i have to copy
the whole thing.

So if i add a new class i have to think of all the domains and other
levels where i overwrote that stuff and add that class.

It would be really nice if there was a way to only overwrite the
anchor so i don't have to copy all the classes that use the value to
the other YAMLs. From what i see in the hiera code this is not
possible at the moment.

Or is this a bad idea in general?

would appreciate your thoughts.

Greetings
Andreas

- -- 
Andreas Zuber
Linux System-Ingenieur
Puzzle ITC GmbH
www.puzzle.ch

Telefon +41 31 370 22 00
Direkt  +41 31 370 22 49
Mobile  +41 79 766 25 51
Fax     +41 31 370 22 01

Werfen Sie einen Blick in unseren Blog:
<http://www.puzzle.ch/blog>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlGTkQsACgkQc2hfmdKpdfUz+wCfey4gqQk2eRnmvPBhNtVeU0/l
nsEAnillIplrYZXN9X/kyyFieNrzI13E
=YAVi
-----END PGP SIGNATURE-----

-- 
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 puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to