Displaying 20 results from an estimated 1000 matches similar to: "Hiera data unusable in a class with an array parameter"
2013 Mar 14
7
hiera_hash lookups for included classes?
When using "include" to include a class Hiera helpfully performs an
autolookup on the parameters of the included class. Specially-named
variable names are automatically pulled from the Hiera datastore(s) and
passed into the included module. This is pretty awesome.
But it looks like included resources _only_ perform a hiera() lookup. If we
have a hash defined in several levels of our
2012 Oct 19
3
Using Hiera with Parameters set for the Puppet Node
Is it possible to have Hiera look at a key set for the node first, before
looking at other items in the hierarchy?
In particular - I''m using Puppet Dashboard and am setting keys & params for
there, so I would like for any value set there for a node to be used over
another item in the hiera hierachy. What value would I have to specify in
the hierarchy for this, if it is possible?
2013 Feb 22
3
puppet could'nt find hiera even when hiera gem is installed
Hiera was properly working in my environment. But puppet was looking at old
version even when I have the latest hiera gem installed. So I could''nt
use json backend. But puppet is not looking at my latest hiera gem. Not
sure when went wrong here.
Scenario:
I have installed hiera couple of months back. So the gem was installed
under
/opt/puppet/lib/gems/1.8/gems/hiera-0.3.0
2012 Dec 17
20
early clean exit from module?
Hi folks,
I''ve poked around the language reference, and havent found anything on this
so far. I''d like to be able to force a clean early exit from a module.
WITHOUT encasing the whole body of the module in an if statement.
What I''m looking for:
class somemodule {
#no this isnt going to be a global variable I''m just using that as an
example,
if
2013 May 02
2
Puppet 3.1.1, hiera and parameter autoload
Hello all,
I don''t know if I have hit a strange bug or it''s just an incorrect
interpretation about how parameter autoloading works... Today I have been
searching, analysing and about to hit my head against a wall trying to
figure out why a call to hiera_hash was not merging data from top level
among different hierarchies. The problem was that I was trying to do
something
2012 May 14
2
defaults for virtual defined resources from hiera.
Hi,
This follows on a bit from the previous thread ''trouble with hiera and
puppet defines'' [1]
Up to now I''ve had a large file of virtual resources and then enabled them
on demand
on various services. The very standard.
@metric{''1234:
one => 1
two => [1,2]
}
@metric{''abcd'':
one => a,
two => [b,c]
}
and
2011 Dec 06
1
module can't find other modules
I have these three modules with the following structure:
|-- modules
| |-- create_resources
| | |-- LICENSE
| | |-- Modulefile
| | |-- README
| | |-- lib
| | | `-- puppet
| | | `-- parser
| | | `-- functions
| | | `-- create_resources.rb
| | |-- spec
| | | |-- spec.opts
| | | |-- spec_helper.rb
| | | `-- unit
2012 Apr 16
1
hiera puppet augeas and hash keys ?
Hi,
if possible can someone post a working example please ?
I am using hiera => puppet => augeas.
cat myserver.yaml
---
myserver:
"Birthday": ''1''
"Debug": ''5''
The no. of settings will change, so i would like to use a hash here.
The hiera lookup works already:
>hiera -c /etc/puppet/hiera.yaml -h myserver
2013 Jan 30
1
Hiera parameter lookup, nesting variables and Puppet 3
Hi,
I''m trying to reconcile the advice in the Puppet 3 class doc with our
current use of Hiera. We currently retrieve variables from Hiera in one big
collection while the Puppet 3 doc seems to indicate storing variables
without the collection.
For example, we have a module to manage a log indexer. In its init.pp it
says:
class log_indexer(
$log_indexer_conf =
2012 May 22
2
Announce: Hiera-Puppet 1.0.0rc1 Available
Hiera-Puppet 1.0.0rc1 is a feature release candidate designed to
accompany Puppet 3.0 and Hiera 1.0.
It includes Puppet functions for hiera and also the puppet backend for
hiera lookups.
Downloads are available:
* Source http://downloads.puppetlabs.com/hiera/hiera-puppet-1.0.0rc1.tar.gz
* Apt and yum development repositories
* Apple package
2012 Aug 17
5
Hiera, Hashes, and Create_resources
Howdy:
I need some help please to get hiera configuration data derived
from YAML, thru puppet. I have studied Internet search results and
puppet documentation on create_resources and custom defines but
need a little help along. I can print out the YAML from variables,
arrays, and, finally, hashes too from a puppet manifest.
One thing that is stumping me is how to access from the custom
define
2012 Mar 16
3
Simple hiera-puppet usage
Hi all,
I am trying to understand how does hiera puppet backend work, so I created the
following example:
hiera.yaml has only:
---
:backends:
- puppet
---
And the node:
node ''testnode'' {
$variable = ''kk''
$thing = hiera ("variable")
notify { "note: $thing": }
}
I don''t want to use the yaml backend for now, just want to
2012 Feb 17
3
Managing /etc/yum.conf
Hi,
It''s easy enough to modify, say, the "exclude" variable in /etc/yum.conf
with something like:
augeas { yum_exclude_kernel:
context => ''/files/etc/yum.conf/main'',
changes => ''set exclude kernel*''
}
However, I''d like a more flexible system where I can "build" the list of
excludes from
2012 Nov 23
3
how to query yaml file with hiera function.
Hi guys,
i have a hiera.yaml config file like this:
---
:hierarchy:
- %{env}/%{tmp_module_name}
- %{env}/%{tmp_module_name}.common
:backends:
- yaml
:yaml:
:datadir: ''/etc/puppet/hieradata''
I also have a test/some_module.yaml file like this:
---
db:
root : pass
port : ''3306''
I am also using the hiera function
2013 Oct 30
2
:merge_behavior: deeper and hiera_hash
Hi,
To my surprise hashes passed to class parameters pulled from hiera with
:merge_behavior: deeper, are not merged "as expected", where as hiera_hash
does work "as expected".
Or to rephrase: they behave differently, despite merge_behavior being set.
I found a snippet documenting this here:
http://docs.puppetlabs.com/hiera/1/lookup_types.html#deep-merging-in-hiera--120
2013 Apr 03
1
Using single hiera hash for two create_resources, and mounting filesystems
I am trying to use the same hiera hash to create the mount point and
mounts. (Would be nice if mount could create the mount points using 3.1.1)
My plan was to define create_mount_points and use create_resources with the
same hash, and just though away what I dont use.... maybe there is a
better means?
Here is the mount class:
class fstab::mounts ( $config = undef ) {
$defaults = {
2013 Aug 23
1
Test the result of a hiera_hash() lookup
Hi folks,
Is there a way to test the result of a hiera_hash() lookup in a manifest? I
am trying to use hiera to do most of my configuration, like this for
example:
mysql::grants:
''user1@localhost'':
privileges:
- select_priv
''user2@localhost'':
privileges:
- select_priv
- insert_priv
- lock_tables_priv
I have a wrapper
2013 Oct 15
6
hiera_array, structured data and multiple levels of hierarchy
Hi all!
I''m trying to setup a puppet module for sudo that will write multiple files
with separate data for each file, all dependent on the hiera hierarchy.
Here''s the relevant portion of my hiera.yaml:
> :hierarchy:
>
> - "datacenter/app/role/node/%{::clientcert}"
>
> - "datacenter/app/role/%{::server_role}"
>
> -
2012 Feb 06
3
Passing class parameters to hiera
I am using puppet 2.6.11 and want to pass parameter for implementing
sudo for mulitple users. So here is my simple code, which I would like
to pass to hiera to specify user name lookup. Appreciate any help,
thanks in advance.
class sudo( $name) {
#Class:: sudo
#
#
package { "sudo": ensure => present, }
file { "/etc/sudoers":
owner => root,
group => root,
2012 Mar 30
2
Does create_resources support virtual resources?
Hi all,
I''m interested pushing my user list out of my users manifest and into
Hiera. Unfortunately I haven''t been able to get it to work the way I
thought it would. The error suggests that perhaps create_resources
cannot create virtual resources, but the docs I''ve read so far don''t
address it.
The class (in init.pp):
class users {
$system_users =