search for: create_resource

Displaying 20 results from an estimated 43 matches for "create_resource".

Did you mean: create_resources
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 = { atboot => true, ensure => ''mounted'', } $hiera_config = hiera_hash(''f...
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 = hiera(''system_users'') $system_groups = hiera(''system_groups'') create_resources("@users::mkuser&...
2013 Mar 08
5
hiera / create_resources / define
I''m trying to use create_resources to create a series of files with semi-custom content based on a template. This is what I have: foo.conf.erb: Name "<%= name %>" WorkingDir "<%= working_dir %>" ... a bunch of static entries YAML: configs: config1: Name: app1 WorkingDir: /var/app...
2013 Sep 02
0
chaining of create_resources
Hi I am using create_resource to create a dir and then mount it. I am using two create_resources and want one to be completed before other. $mount_point = hiera(''test::mount_point'', []) $defaults = { ''ensure'' => ''directory'', } $mountit = hiera(''test::mountit...
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 only the YAML element of server-a which is I believe is an object of an array o...
2013 Jan 11
13
Profiles, Hiera, and create_resources('class','...')
...e role / profile / component module described by Craig Dunn in his blog here: http://www.craigdunn.org/2012/05/239/ and discussed on the list the other day. As I was implementing this for a profile using the apache module, I realized that I could make another refinement to our approach by using create_resources(''class'',''<module name>'') to pull our hiera data into the apache class and override any defaults needed. It looks good to me but there are some concerns that it will come back and bite us in ways we don''t expect later on, when updating to Puppe...
2013 Jun 12
2
Executing a script after creating vhosts with create_resources
...''d love a bit of advice in terms of how I should best go about this. I am creating a bunch of vhosts, their definitions are stored in json (I''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'')...
2013 Jul 30
2
Failed to parse template, wrong number of arguments (create_resources)
I''m having some issues trying to track down a problem I''m having parsing a simple template, using create_resources and Hiera. Here''s my setup (abridged): ../hieradata/settings.yaml: *global:* * variables:* * env: foo* * * *appSpecific:* * serverName: someServer* ../modules/test/manifests/init.pp: *class test {* * create_resources(test::variables, hiera(''global''))* * $...
2011 Mar 23
1
Ruby DSL: create_resource with exec
Hi! How to create "exec" resource in ruby DSL? Found mention of create_resource but had no luck in using it =( -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com....
2011 Aug 17
3
Using back-ported create_resources in 2.6.x
Does anyone have some examples of using this create_resources function, https://github.com/puppetlabs/puppetlabs-create_resources, ? Based on the README example I can''t figure out exactly how to change from using defines to using this function. Maybe I misunderstand the purpose of create_resources...is it to replace defines, or is it to allow ENCs...
2012 Jul 20
2
rspec-puppet and create_resources
Using rspec-puppet should I be able to check for resources created as a result of a create_resources call within a class? Regards, Mark -- 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/-/bUD_CitDYCAJ. To post to this group, send email to puppet-users...
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 | | | `-...
2012 Jul 18
1
create_resources function and puppet enc
Hi, I am trying to create multiple users using puppet. I have created a ENC and trying to use class wrapped defined types with create_resources function. For some reason things are falling apart. I would really appreciate some help on these Here are the details about my classes and configuration http://serverfault.com/questions/409001/create-resources-function-and-puppet-enc -- You received this message because you are subscribed t...
2012 Nov 15
4
Can I create virtual resources with create_resources function
...is module out of the box. Using the pattern in that module, I tried to do this: class system::virt_users ( $config = undef ) { if $config { $defaults = { ensure => ''present'', managehome => true, shell => ''/bin/bash'' } create_resources(@user, $config, $defaults) } } But that gives me syntax error: Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Syntax error at ''@''; expected '')'' at /etc/puppet/modules/system/manifests/virt_users.pp:10 on node ...... So I tried...
2013 Oct 15
6
hiera_array, structured data and multiple levels of hierarchy
...ALL This is the closest I''ve been able to get, however, notice I''m not using ''hiera_array'', thus, only 1 level of hierarchy is written. class sudo_crap { # Errors with: # Error: Could not run: Hiera type mismatch: expected Array and got Hash #create_resources(sudo_crap::sudo_configs, hiera_debug_array(''sudoers'')) > # works for only one level of hierarchy create_resources(sudo_crap::sudo_configs, hiera_debug(''sudoers'')) > # Errors with: # Error: Could not run: Hiera type mismatch: expected Array an...
2013 May 09
1
equivalent way to iterate through a hash
...e, $value){ file { "/var/lib/supervise/${service_name}/env/${key}" : mode => 644, content => "$value", } } define setup( $service_name, $extra_envs={}, ){ create_resources(envdir_file, $extra_envs) .... -------------------------------------------------- But I get the error at the create_resources() line. can''t convert String into Hash Is this the right approach? Or is there a more idiomatic way? Is it even possible to iterate through...
2013 Aug 23
1
Test the result of a hiera_hash() lookup
...: privileges: - select_priv ''user2@localhost'': privileges: - select_priv - insert_priv - lock_tables_priv I have a wrapper class that then does this: class custom::mysql::grants { $grantoptions = hiera_hash(''mysql::grants'') create_resources(''database_grant'', $grantoptions) } That works fine as long as I include the custom::mysql::grants class. But right now I can only include that class on nodes where I define explicit grants. If I don''t have the mysql::grants hash defined for that node in hiera, puppet...
2013 Apr 19
12
How to pass puppet/hiera veriable to external script ? Do I need to ?
...1/manifests/site.pp node default { hiera_include ( "classes", [] ) } /etc/puppet/environments/env1/hieradata/common.yaml classes: - accounts /etc/puppet/environments/env1/modules/accounts/manifests/init.pp class accounts::users ( $accounts, $groups, ) { create_resources(group, $groups) create_resources(user, $accounts, { notify => Exec[''clean_up_accounts''] }) } class accounts::cleanup { exec { "clean_up_accounts": command => "/script/to/cleanup", refreshonly => true,...
2012 Jul 20
2
Lookup another node's hiera data - fqdn hierarchy
...attempt may work, but it doesn''t ''feel'' right to me by overriding the fqdn fact. /etc/puppet/modules/test $ cat manifests/hiera_lookup.pp class test::hiera_lookup { $nodes = foreman(''fact_values'', ''fact = fqdn'') if $nodes { create_resources(''test::hiera_lookup::get_data'', $nodes) } } define test::hiera_lookup::get_data ( $fqdn ) { $data = hiera("backuppc_db_dumps", false) if $data { notify { $data: } } } Is there a better approach to override scope and grab what data from hiera that would norm...
2012 Aug 29
9
puppetlabs-stdlib
I''m confused about this... https://github.com/puppetlabs/puppetlabs-stdlib/ I see a lot of functions there that are the same as the ones that come standard with puppet. If I create a module and dump this stuff in there, what happens to the existing stuff? How does puppet know which one to use? Doug -- You received this message because you are subscribed to the Google Groups