how to manage a resource to single instance using hiera fqdn in a datacenter.

10 views
Skip to first unread message

linuxlearni...@gmail.com

unread,
Oct 30, 2018, 12:42:59 PM10/30/18
to Puppet Users

I'm new to hiera. can someone please guide with some references how to install a package only to a single node for the 20 nodes in a datacenter pointing to the same role using hiera fqdn. Thanks in advance


jcbollinger

unread,
Oct 31, 2018, 9:39:54 AM10/31/18
to Puppet Users


On Tuesday, October 30, 2018 at 11:42:59 AM UTC-5, linuxlearni...@gmail.com wrote:

I'm new to hiera. can someone please guide with some references how to install a package only to a single node for the 20 nodes in a datacenter pointing to the same role using hiera fqdn. Thanks in advance


Determining what resources to apply to a node (by means of determining which classes to apply to it), is a process called "classification" in the jargon.  Hiera can and sometimes does support classification, but it does not itself perform classification, and it certainly does not itself apply any changes to nodes.

Overall, your question is incredibly broad.  It's analogous to asking "How do I use SQLite to print a football player data sheet?"  There are numerous ways in which you could obtain the results you're after, many of them involving Hiera in one way or another.  The Hiera side would typically involve establishing a per-node level of your Hiera hierarchy, and putting the appropriate data into a data source in that level that matches your target node.  But what "the appropriate data" are depends on the Puppet manifest set you're using, perhaps including code that hasn't yet been written, and possibly on other data.

In the football analogy, these are the questions of database schema, desired datasheet details, and implementation of the program that extracts, formats, and prints the statistics.  Someone else may present an example of a Puppet analog of those things, but I will not spend time on that at this point because I have no way to predict how or whether any particular example would integrate into your existing manifest set.


John

Reply all
Reply to author
Forward
0 new messages