search for: hiera_hash

Displaying 20 results from an estimated 21 matches for "hiera_hash".

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 like this: class jenkins::slave ( $client = hiera_hash("jenkins::slave::client"), $connection = hiera_hash("jenkins...
2013 Mar 14
7
hiera_hash lookups for included classes?
...he 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 Hiera data, and we want the hash to be collapsed into a single hash following hierarchy order, does Hiera offer a way to perform a hiera_hash() lookup for the autolookup? The documentation discourages mixing defined-type module inclusion and "include"-type module inclusion. So if there''s no hiera_hash() option for autolookups, we''re required to use defined-type inclusion, yes? Thanks. -- You received thi...
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 -...
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 Might make sense to make these things allot more apparent by lis...
2012 May 14
2
defaults for virtual defined resources from hiera.
...;c'' I accept to have to use that hierarchy rather than the perhaps more obvious metric: 1234: ... abcd: ... since hiera can only select on the first level as the key?, i.e hiera(metic[1234]) or something is not posible is it? To realize in a manifest the following works: $h = hiera_hash(''metric4102'') $g = { ''4102'' => $h } create_resources(''lemon::metric'',$g) however what I would like to do is get the defaults from hiera within the defined resource so it becomes like the following which is incorrect but hopefully explains...
2012 Apr 16
1
hiera puppet augeas and hash keys ?
...y: >hiera -c /etc/puppet/hiera.yaml -h myserver {"Debug"=>"5", "Birthday"=>"1"} I can save a single value via hiera => puppet => augeas sucessfully when i know its variable name. What i am searching for is the proper syntax to use ''hiera_hash'' and save all settings into augeas with ''set $name $value'' coming from the yaml-file. In perl it would be have been like this: foreach $key (keys %hash){ print "$key $hash{$key}\n"; } Thank you -- You received this message because you are subscribed to t...
2012 Feb 10
7
Hiera data unusable in a class with an array parameter
Given the following hiera hash: common.yaml: --- *allowed_ips:* * "First IP": 1.2.3.4* * "Second IP": 5.6.7.8* and the module: *class iptables ($role) {* * file {/tmp/test:* * content => template(iptables/test.erb)* * }* *}* with the corresponding template test.erb: *<% role.each do |role| -%> * * code* *<% end %>* *<%
2013 Jan 30
1
Hiera parameter lookup, nesting variables and Puppet 3
...ent 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 = hiera_hash(''log_indexer_conf''), ){ class {''log_indexer::config'': log_indexer_conf => $log_indexer_conf} } One of the templates used says: cluster.name: <%= @log_indexer_conf[''elasticsearch_cluster_name''] %> The associ...
2012 Aug 17
5
Hiera, Hashes, and Create_resources
...ocal/etc/puppet/hieradata # cat Inuit.pp class user { $sshd_hash = hiera(servers) create_resources(''sshd_lookup'', $sshd_hash) } define sshd_lookup ( $sshd_auth, $ClientAliveInterval, $ClientAliveCountMax, $server_role, $location ) { $data = hiera_hash(''servers'') $sshd_type = $data[$hostname][''sshd_auth''] notice ("setting sshd_type: $sshd_type" ) } Thanks, Regards, -dkw -- You received this message because you are subscribed to the Google Groups "Puppet Users" grou...
2012 May 22
2
Announce: Hiera-Puppet 1.0.0rc1 Available
...Please report feedback via the Puppet Labs Redmine site, using an affected version of 1.0.0rc1: http://projects.puppetlabs.com/projects/hiera-puppet Hiera-Puppet 1.0.0rc1 Changelog === Gary Larizza (2): 894a7a4 Fail if a lookup key isn''t passed 927de1f Add test coverage for hiera_hash() Hunter Haugen (1): 632457e Rubygems is not required to use hiera Kelsey Hightower (2): 48bfccb (#14461) Remove Puppet parser functions a042de4 Revert "(#14461) Remove Puppet parser functions" Ken Barber (1): 2df319a (#14124) Load rake tasks directly to fix tes...
2013 Jun 12
2
Executing a script after creating vhosts with create_resources
...9;m using heira) that json file will be generated from data held on another server. I''m just using the puppetlabs apache module and create_resources to then generate all the vhosts and their directories etc. I''m then doing the same to create associated mysql databases. $sites = hiera_hash(''apache_vhosts'') create_resources(''apache::vhost'',$sites) $db = hiera_hash(''mysql_db'') create_resources(''mysql::db'',$db) What I need to know however is when a vhost and db has been created. So I can kick off a PHP script...
2013 Apr 03
1
Using single hiera hash for two create_resources, and mounting filesystems
...nd 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 = { atboot => true, ensure => ''mounted'', } $hiera_config = hiera_hash(''fstab::mounts'', undef) if $hiera_config { create_resources(fstab::create_mount_points, $hiera_config ) create_resources(mount, $hiera_config, $defaults) } } the define define fstab::create_mount_points ( $config = undef ) { file{ $name: ensure =>...
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 =
2011 Dec 06
1
module can't find other modules
...-- hiera | | | | |-- backend | | | | | `-- puppet_backend.rb | | | | `-- scope.rb | | | `-- puppet | | | `-- parser | | | `-- functions | | | |-- hiera.rb | | | |-- hiera_array.rb | | | |-- hiera_hash.rb | | | `-- hiera_include.rb | | `-- spec | | |-- spec.opts | | |-- spec_helper.rb | | `-- unit | | |-- puppet_backend_spec.rb | | `-- scope_spec.rb | `-- tomcat | |-- files | | `-- war | | |-- jenkin...
2012 Jul 27
0
puppet 3 and hiera
...t_master => true; } Basenode is: class basenode ( $is_puppet_master = false, $apt_host = ''repo.domain.com'' ) { ... } For the module, hiera is not explicitly used. Also, root@ll-puppet-master-vm:/usr/lib/ruby/1.8/puppet/parser/functions# ls hiera* hiera_array.rb hiera_hash.rb hiera_include.rb hiera.rb Am I missing something? Thanks. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/BN3tA57HB1AJ. To post to this grou...
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 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?
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 Sep 20
1
Automation of puppet configuration code
Hello, I work for the CHTC (Center for High Throughput Computing) at the University of Wisconsin, Madison. We utilize puppet for most of our configuration management. Currently we have a web application that performs the tasks of user account management. When a new user is registered with the application, the application does some very limited parsing of a puppet manifest that has
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,