Hiera changes on specific node

14 views
Skip to first unread message

Amber Mehra

unread,
Nov 18, 2016, 9:04:18 AM11/18/16
to Puppet Users, amber mehra
Hi Guys,

I need your advise on Puppet Hiera, I already have apache puppet module and it seems working fine, I want to do customize  httpd.conf on specific node by puppet hiera, If i make changes on puppet module it will affect to all node that i don't want.

Please advise what to write on hiera so i can push custom configuration of httpd.conf on specific node only.

Thanks in advance

Best Regards

Dirk Heinrichs

unread,
Nov 18, 2016, 9:21:34 AM11/18/16
to puppet...@googlegroups.com
Am 18.11.2016 um 12:56 schrieb Amber Mehra:

Please advise what to write on hiera so i can push custom configuration of httpd.conf on specific node only.

That depends on your setup.

In general, say you have the following class definition:

class foo ($bar = undef) {}

and your hierarchy in hiera.yaml looks like this:

:hierarchy:
  - "node/%{::fqdn}"
  - common

You would then put common values for $bar into hiera's common.yaml like so:

foo::bar: common_value

and values for specific nodes would go into node/<fqdn of node>.yaml, overwriting what is defined in common.yaml:

foo::bar: node_specific_value

HTH...

    Dirk
--
Dirk Heinrichs | Senior Systems Engineer, Delivery Pipeline
http://mimage.opentext.com/alt_content/binary/images/email-signature/recommind-ot.png
Tel: +49 2226 159666 (Ansage) 1149
Email: dirk.he...@recommind.com
Skype: dirk.heinrichs.recommind

Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach

Vertretungsberechtigte Geschäftsführer John Marshall Doolittle, Gordon Davies, Roger Illing, 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.

Reply all
Reply to author
Forward
0 new messages