Discussion:
[Puppet Users] how to manage a resource to single instance using hiera fqdn in a datacenter.
l***@gmail.com
2018-10-30 08:19:15 UTC
Permalink
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
--
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+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/f86a578a-204b-4476-8f42-b0f472d37978%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
jcbollinger
2018-10-31 13:39:54 UTC
Permalink
Post by l***@gmail.com
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
<https://puppet.com/docs/puppet/6.0/hiera_config_yaml_5.html#configuring-a-hierarchy-level-built-in-backends>,
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
--
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+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/6982f930-eefb-4e9e-9574-02d10abc0b1f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...