[Puppet Users] dynamic /etc/hosts
Hi, I just started learning puppet, and still have problems understanding the advanced puppet language. I am using the puppet example42/hosts module to have a dynamic /etc/hosts file. Its working fine so far but i have one more requirement, i need to force update on all other nodes if one node changes or get added. Thanks, Peter -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAKiz-NeLF2tqATrJjbDDFYB9SbEWFjyZ27E3kMK9K9tx%2BJAOag%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Puppet::Parser::AST::Resource failed with error ArgumentError:
Hi Jacob, Thanks that worked. Jyotir On Monday, 20 January 2014 09:22:33 UTC+5:30, jyotir bhandari wrote: > > Hi > > I am getting error when i try to add system user including fields > mentioned in system_user.pp, if I manually mention all the fields in > init.pp, it just works fine. > > [root@server accounts]# pwd > /etc/puppet/modules/accounts > [root@server accounts]# tree > . > `-- manifests > |-- init.pp > `-- system_users.pp > > 1 directory, 2 files > > > *init.pp* > > class accounts { >@accounts::system { 'demo': >comment => 'demo users', >password => 'fndjsafjdashbjfsdhj', >} > } > > *system_users.pp* > > define accounts::system ($comment,$password){ > user { $title: >ensure => 'present', >shell => '/bin/bash', >managehome => true, >comment => $comment, >password => $password, > } > } > > > Jyotir > > -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/a5ad61f8-c4c4-4d6c-b0aa-44c8d8e6149e%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Puppet::Parser::AST::Resource failed with error ArgumentError:
Hi Jyotir, The filename and the defined type names need to be the same, you can either rename the define to accounts::system_users or rename the file to system.pp Jacob On 20 January 2014 14:52, jyotir bhandari wrote: > Hi > > I am getting error when i try to add system user including fields > mentioned in system_user.pp, if I manually mention all the fields in > init.pp, it just works fine. > > [root@server accounts]# pwd > /etc/puppet/modules/accounts > [root@server accounts]# tree > . > `-- manifests > |-- init.pp > `-- system_users.pp > > 1 directory, 2 files > > > *init.pp* > > class accounts { >@accounts::system { 'demo': >comment => 'demo users', >password => 'fndjsafjdashbjfsdhj', >} > } > > *system_users.pp* > > define accounts::system ($comment,$password){ > user { $title: >ensure => 'present', >shell => '/bin/bash', >managehome => true, >comment => $comment, >password => $password, > } > } > > > Jyotir > > > -- > 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+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/puppet-users/b0655764-7abb-481b-a49a-cd2410b8bc20%40googlegroups.com > . > For more options, visit https://groups.google.com/groups/opt_out. > -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAOQMBgyQympH2rjhqZCnsTbguUPCVBz1ccwJdUk_%2BsFg69WFRg%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Puppet::Parser::AST::Resource failed with error ArgumentError:
Hi I am getting error when i try to add system user including fields mentioned in system_user.pp, if I manually mention all the fields in init.pp, it just works fine. [root@server accounts]# pwd /etc/puppet/modules/accounts [root@server accounts]# tree . `-- manifests |-- init.pp `-- system_users.pp 1 directory, 2 files *init.pp* class accounts { @accounts::system { 'demo': comment => 'demo users', password => 'fndjsafjdashbjfsdhj', } } *system_users.pp* define accounts::system ($comment,$password){ user { $title: ensure => 'present', shell => '/bin/bash', managehome => true, comment => $comment, password => $password, } } Jyotir -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/b0655764-7abb-481b-a49a-cd2410b8bc20%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] hiera calling_class files fail with yaml provider on Windows
Hi, that's what sprang to my mind, too, when I read your problem description. >From experience, it can be a little daunting to override certain parts of hiera functionality in a custom backend. You may find yourself using some copy-paste because some methods live on the module level and cannot be overridden directly. HTH, Felix On 01/13/2014 10:47 PM, Ben Hines wrote: > As a workaround i was considering implementing a custom Hiera backend, > but i'm not sure if there is an easier method. -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/52DC80DB.2040509%40Alumni.TU-Berlin.de. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Re: overriding class parameters with 'undef'
What I like to do in situations like this: service { 'httpd': name => $service_name, enable => $service_enable, } if $service_ensure { Service['httpd'] { ensure => $service_ensure } } It looks like an override, but it does work in the same class iff the respective properties (or parameters) are not yet declared. Cheers, Felix On 01/13/2014 08:01 PM, Jeffrey Lewis wrote: > For reference, I modified manifests/service.pp to look like this: > > service { 'httpd': > ensure => $service_ensure ? { > '' => undef, > default => $service_ensure, > }, > name => $service_name, > enable => $service_enable, > } -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/52DC7E43.5000605%40Alumni.TU-Berlin.de. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: uninitialized constant Puppet::FileSystem::File
So root cause of this error was a plugin being pushed with another module. sorted.. On Saturday, January 18, 2014 8:40:00 PM UTC-8, Mike Skint wrote: > > > Hi, > > I'm running puppet 3.4.2 and on some nodes I'm seeing them fail with the > following errors. > Not sure where they are coming from. None of my manifests or modules > include these. > > Any help is most appreciated. > > Errors: > > uninitialized constant Puppet::FileSystem::File > > Could not autoload puppet/util/instrumentation/listeners/log: Class Log is > already defined in Puppet::Util::Instrumentation > > > Failed to apply catalog: Could not autoload > puppet/util/instrumentation/listeners/log: Class Log is already defined in > Puppet::Util::Instrumentation > -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/1ad83d7c-191b-4df5-b7e0-a5246fb7878e%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] How to manage SugarCRM config.php with Puppet?
Hi On 20 Jan 2014, at 7:34 am, Erwin Bogaard wrote: > Hi, > > I'm looking into a way to manage the SugarCRM config.php (see partial example > below this message). This proposes several problems: > 1. The file is full of arrays and arrays-in-arrays (So I think Augeas is > useless, as far as I understand it) > 2. Not all config.php's contain the same arrays and/or key-value > combinations. It's possible that in one config.php a certain arrays is > needed, while it isn't in another and that teh value of a certain key needs > to be different and is set from SugarCRM. So to summarize: I don't want to > manage every array and key/value in config.php. (So I think and > config.erb-template is out of the question) Using a template is the best way to manage it in my opinion. If your dataset is that complex you would need to manage it for each individual node no matter which method you chose to utilise. Using hiera will make that simple. It’s not that tricky to generate entries in a template from an array. It’s also not that tricky to use an inline_template to generate a variable. > 3. I could use exec with sed and for every array and key/value I need to > manage, but that would probably make it quite complex (if possible at all), > as I need to check for existance first, and depending on the outcome, add the > array or key/value or change the existing pair. This is the worst idea in my opinion. Please don’t go down that path. Managing that by itself will be a nightmare. > The way I used to do this was manage config_override.php, in which you can > specify arrays and key/values which override the ones in config.php, with an > erb template. Problem with that, is that when you change something in the > SugarCRM-interface, it 's added/changed in config_override.php. Which is then > regularly overwritten by Puppet, so the change is reverted. > > Does anyone have a good suggestion to manage this file reliably and with > reasonable complexity with Puppet? > > - > Example file (partial): > $sugar_config = array ( > 'Reschedule' => > array ( > 'version' => '2.0', > ), > 'SAML_X509Cert' => '', > 'SAML_loginurl' => '', > 'addAjaxBannedModules' => > array ( > 0 => 'AOS_Contracts', > 1 => 'AOS_Invoices', > 2 => 'AOS_Quotes', > 3 => 'AOS_PDF_Templates', > 4 => 'asol_Reports', > 5 => 'Accounts', > 6 => 'Contacts', > 7 => 'Leads', > 8 => 'Prospects', > ), > 'admin_access_control' => false, > 'admin_export_only' => false, > 'aos' => > array ( > 'version' => '5.3.2', > 'contracts' => > array ( > 'renewalReminderPeriod' => '14', > ), > 'lineItems' => > array ( > 'totalTax' => false, > 'enableGroups' => true, > ), > 'invoices' => > array ( > 'initialNumber' => '1', > ), > 'quotes' => > array ( > 'initialNumber' => '1', > ), > ), > 'authenticationClass' => '', > 'cache_dir' => 'cache/', > 'calculate_response_time' => true, > ... > ... > ); > > -- > 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+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/puppet-users/e7c27236-f397-471e-b0ad-8e881e016a4b%40googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/F05138E5-ED9E-496D-BFD8-45925AEEC0EF%40gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Re: puppet catalog compilation job queue idea
Hi, you both raise a couple of good points. All things considered, I lean towards John's point of view. There's much to say for on-demand compilation. - resource use scales with number of agents - scaling can be influenced via intervals - admins can predict the need for recompilation and trivially schedule it by having agents check in Yes, there can be peak load when many agents check in during a short interval. I can't really see a way around that. I would consider it more problematic to make it impossible to trigger a couple of quick recompilations for a large number of nodes (think ad hoc changes to larger cluster or cloud). Cheers, Felix -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/52DC563D.1080908%40Alumni.TU-Berlin.de. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] How to manage SugarCRM config.php with Puppet?
Hi, I'm looking into a way to manage the SugarCRM config.php (see partial example below this message). This proposes several problems: 1. The file is full of arrays and arrays-in-arrays (So I think Augeas is useless, as far as I understand it) 2. Not all config.php's contain the same arrays and/or key-value combinations. It's possible that in one config.php a certain arrays is needed, while it isn't in another and that teh value of a certain key needs to be different and is set from SugarCRM. So to summarize: I don't want to manage every array and key/value in config.php. (So I think and config.erb-template is out of the question) 3. I could use exec with sed and for every array and key/value I need to manage, but that would probably make it quite complex (if possible at all), as I need to check for existance first, and depending on the outcome, add the array or key/value or change the existing pair. The way I used to do this was manage config_override.php, in which you can specify arrays and key/values which override the ones in config.php, with an erb template. Problem with that, is that when you change something in the SugarCRM-interface, it 's added/changed in config_override.php. Which is then regularly overwritten by Puppet, so the change is reverted. Does anyone have a good suggestion to manage this file reliably and with reasonable complexity with Puppet? - Example file (partial): array ( 'version' => '2.0', ), 'SAML_X509Cert' => '', 'SAML_loginurl' => '', 'addAjaxBannedModules' => array ( 0 => 'AOS_Contracts', 1 => 'AOS_Invoices', 2 => 'AOS_Quotes', 3 => 'AOS_PDF_Templates', 4 => 'asol_Reports', 5 => 'Accounts', 6 => 'Contacts', 7 => 'Leads', 8 => 'Prospects', ), 'admin_access_control' => false, 'admin_export_only' => false, 'aos' => array ( 'version' => '5.3.2', 'contracts' => array ( 'renewalReminderPeriod' => '14', ), 'lineItems' => array ( 'totalTax' => false, 'enableGroups' => true, ), 'invoices' => array ( 'initialNumber' => '1', ), 'quotes' => array ( 'initialNumber' => '1', ), ), 'authenticationClass' => '', 'cache_dir' => 'cache/', 'calculate_response_time' => true, ... ... ); -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/e7c27236-f397-471e-b0ad-8e881e016a4b%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Re: Choo choo here comes the FOSDEM train
I'll be around from Friday afternoon for FOSDEM, and also in Gent for Config Management Camp. Gareth Rushgrove IRC/Twitter/GitHub: @garethr Gareth On 19 January 2014 18:03, Klavs Klavsen wrote: > I'll be there as well.. saturday and sunday only though. (FiXion on irc) > > see http://blog.klavsen.info/ for a larger picture :) > > looking forward to seeing you there. > > -- > 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+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/puppet-users/e6c4f157-e59a-427b-9135-c1229a9314b2%40googlegroups.com. > > For more options, visit https://groups.google.com/groups/opt_out. -- Gareth Rushgrove @garethr devopsweekly.com morethanseven.net garethrushgrove.com -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAFi_6yJtgyxdk0sEaj3ECk0g7yrB-%3DmvzmfWBj-JsVUxhztZ-Q%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Choo choo here comes the FOSDEM train
I'll be there as well.. saturday and sunday only though. (FiXion on irc) see http://blog.klavsen.info/ for a larger picture :) looking forward to seeing you there. -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/e6c4f157-e59a-427b-9135-c1229a9314b2%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Module contributing guidelines
I finally added a CONTRIBUTING file to one of my open source puppet modules which has seen a bunch of people submitting pull requests. https://github.com/garethr/garethr-docker/blob/master/CONTRIBUTING.md This comes up on GitHub when submitting a new pull request or issue like so: https://github.com/garethr/garethr-docker/issues/new I was after some feedback before adding it to a bunch of other projects, and also looking for any other good CONTRIBUTING files for puppet modules. Seems like one of those things that benefits from a community consensus. Gareth -- Gareth Rushgrove @garethr devopsweekly.com morethanseven.net garethrushgrove.com -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAFi_6y%2BSzKxyP8jLidnzfzDB73qMdrQQ3w9sj%2BtiBrZUYLfavg%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Using puppet for IT asset management of disconnected hardware
Hi, I don't really see what puppet is supposed to do with information about standby/spare hardware. Can you elaborate? Thanks, Felix On 01/10/2014 11:58 AM, Vladislav Geller wrote: > Is there a standard way of dealing with systems (well, in reality any > hardware) that is not actually part of the puppet deployment to keep > track of it? I would like to store data such as each spare hard drive, > CPU, Memory i have at a given location, however it's not connected. My > understanding is that i can achieve this using facts terminus to query > this data and an ENC to put it into the system. -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/52DC07AE.9020403%40Alumni.TU-Berlin.de. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find class
Hi Jose, Thanks, that helped and worked for me. Jyotir On Sunday, 19 January 2014 15:42:12 UTC+5:30, jyotir bhandari wrote: > > Hi > > I am trying to install package, which i was able to install if I kept the > pp file in manifests and then importing via site.pp, but not working when i > put it in module directory and then including class in nodes.pp > > *On puppet master* > > [root@server puppet]# tree > . > |-- auth.conf > |-- fileserver.conf > |-- manifests > | |-- nodes.pp > | `-- site.pp > |-- modules > | `-- packages > | `-- manifests > | `-- nmap.pp > `-- puppet.conf > > > *site.pp* > > import 'nodes.pp' > > *nodes.pp* > > node 'server.puppet.com' { > } > > node 'client1.puppet.com' { > } > > node 'client2.puppet.com' { > include nmap > } > > > *nmap.pp* > > > class nmap { > case $operatingsystem { > centos, redhat: { > package { "nmap": > ensure => installed, > } > } > debian, ubuntu: { > package { "nmap": > ensure => installed, > } > } > } > } > > > > *error on puppet client* > > Error: Could not retrieve catalog from remote server: Error 400 on SERVER: > Could not find class nmap for client2.puppet.com on node > client2.puppet.com > Warning: Not using cache on failed catalogr > Error: Could not retrieve catalog; skipping run > > > Jyotir > -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/bafc2a1b-8652-4555-9716-c0f32f11ccdd%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find class
Ah! And the directory packages should be called nmap (the same name than the class, is how autoloader find it) Regards, -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/d06723e7-c635-477b-b18c-e78f345e08a2%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find class
Hi, Nmap.pp should be called init.pp Regards, -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/523cf7dd-ad36-48c9-a842-53476dfb419d%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find class
Hi I am trying to install package, which i was able to install if I kept the pp file in manifests and then importing via site.pp, but not working when i put it in module directory and then including class in nodes.pp *On puppet master* [root@server puppet]# tree . |-- auth.conf |-- fileserver.conf |-- manifests | |-- nodes.pp | `-- site.pp |-- modules | `-- packages | `-- manifests | `-- nmap.pp `-- puppet.conf *site.pp* import 'nodes.pp' *nodes.pp* node 'server.puppet.com' { } node 'client1.puppet.com' { } node 'client2.puppet.com' { include nmap } *nmap.pp* class nmap { case $operatingsystem { centos, redhat: { package { "nmap": ensure => installed, } } debian, ubuntu: { package { "nmap": ensure => installed, } } } } *error on puppet client* Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find class nmap for client2.puppet.com on node client2.puppet.com Warning: Not using cache on failed catalogr Error: Could not retrieve catalog; skipping run Jyotir -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/21dd6149-0a31-4f01-b9c3-f6d33356274b%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.