[Puppet Users] Puppet 3.6.2 puppet parser validate failed pre-receive One or more file(s) specified did not exist

2015-03-26 Thread Andreas Dvorak
Dear all,

after the update of the Pupppet Master from 3.3.1 to 3.6.2 the git push 
with a pre-receive hook does not work. My local check does work. In my 
pre-commit I have the same checks.
Is it possible that the git pre-receive hook does not find the file in 
source?
Why does it work in version 3.3.1?

git push

remote:  Checking modules/monit/manifests/config.pp for syntax errors and 
styleguide compliance... 
remote: 'puppet parser validate' failed on 
modules/monit/manifests/config.pp - push deniend. Run tests locally and 
confirm they pass before pushing. 
remote: Error: One or more file(s) specified did not exist:
remote:2
remote: 
remote: Error: Try 'puppet help parser validate' for usage
To git@rh6-puppet-master:/data/git/test.git
 ! [remote rejected] master - master (pre-receive hook declined)


cat config.pp 
class monit::config{
  file {'/etc/monit.conf':
ensure = present,
owner  = 'root',
group  = 'root',
mode   = '0700',
source = [
puppet:///modules/monit/monit.conf_${hostname},
'puppet:///modules/monit/monit.conf',
],
  }
}


Best regards
Andreas

-- 
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/128791b0-0364-4136-8e62-aab35750e65c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] puppetlabs/concat Problem on Windows

2015-03-26 Thread Neil - Puppet List
Hello

As it is a param to the file resource you could set it as the default with

File { source_permissions = ignore, }

Be warned that it may mess up other file resources.

Neil
On 13 Mar 2015 15:13, Fraser Goffin goff...@gmail.com wrote:

 Hi,

 I am attempting to use the puppetlabs/concat module on Windows, but having
 some problems. To keep things really simple since it illustrates the
 problem, here is the mainfest I'm using (note: it just uses concat at this
 stage) :-

 class concat_file {

   concat { 'E:/Temp/puppetTests/myfiles/concatFile.txt':
 ensure = present,
   }
 }

 When run the following is output :-

 Warning: Copying owner/mode/group from the source file on Windows is
 deprecated; use source_permissions = ignore.
(at D:/Apps/puppet/puppet/lib/puppet/type/file/source.rb:133:in `block
 in copy_source_values')
 Debug:
 /Stage[main]/Concat::Setup/File[C:/ProgramData/PuppetLabs/puppet/var/concat/bin/concatfragments.rb]:
 Copying owner
 from the source file on Windows is deprecated; use source_permissions =
 ignore.
 ...
 Error:
 /Stage[main]/Concat::Setup/File[C:/ProgramData/PuppetLabs/puppet/var/concat/bin/concatfragments.rb]:
 Could not evaluate:
 Could not read file
 C:/ProgramData/PuppetLabs/puppet/var/concat/bin/concatfragments.rb:
 Permission denied -
 C:/ProgramData/PuppetLabs/puppet/var/concat/bin/concatfragments.rb

 followed by a number of other consequent errors.

 The Warning is fair enough, but obviously I can't add source_permissions
 as a param since the concat manifest doesn't support it and will throw and
 invalid param error if I try. Its just a warning so OK, lets move on.

 As part of setup (now included by default in init.pp) concatfragments.rb
 is copied to location shown, but clearly does not have permissions to read
 it ?

 If I look at this file I can see that it indeed does not have read (or any
 other) permissions set.

 I tried adding values user, group and mode but to no avail.

 Can anyone suggest what I need to do here ?

 Kind Regards

 Fraser.

 --
 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/89289e85-5f3c-4035-af5a-7b5f9f25383a%40googlegroups.com
 https://groups.google.com/d/msgid/puppet-users/89289e85-5f3c-4035-af5a-7b5f9f25383a%40googlegroups.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.


-- 
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/CAAohVBej4YoWmTekR4t9NfG4skTqfqpiGFczKQMH2Hup_1sTuQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] How to setup Puppet agent run interval at a specific time?

2015-03-26 Thread Christopher Wood
On Thu, Mar 26, 2015 at 06:06:03AM -0700, staceytian4...@gmail.com wrote:
Hi all,
 
I am using puppet 3.7.3.
 
I want my puppet agent to run twice a day, so in puppet.conf, I set
runinterval:
 
#  This setting can be a time interval in seconds (30 or 30s), minutes
(30m), hours (6h), days(2d), or years (5y)
 runinterval = 12h
 
However, how could I setup the puppet agent run to happen at a specific
time?
For example, 2:00am and 2:00pm respectively?
 
Now it seems random. And whenever the machine is rebooted, it will run
puppet agent.

Set your puppet agent to not start as boot, and have a cron job starting an 
agent run at the desired time.

Make sure you don't have too many agents hitting your puppetmaster 
simultaneously, the fqdn_rand() function will help here.

Thanks,
Zaiwen
 
--
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 [1]puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit

 [2]https://groups.google.com/d/msgid/puppet-users/c97554da-5967-41d9-8943-50e5750f8ab5%40googlegroups.com.
For more options, visit [3]https://groups.google.com/d/optout.
 
 References
 
Visible links
1. mailto:puppet-users+unsubscr...@googlegroups.com
2. 
 https://groups.google.com/d/msgid/puppet-users/c97554da-5967-41d9-8943-50e5750f8ab5%40googlegroups.com?utm_medium=emailutm_source=footer
3. https://groups.google.com/d/optout

-- 
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/20150326132800.GA11274%40iniquitous.heresiarch.ca.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Trouble with service resource detecting systemd as provider on FC19

2015-03-26 Thread James Olin Oden
Thanks Felix, I figured the work around out, but its good to see a
response.   I think Fedora 19 is by default configured to use systemd.
   I suppose I should look inside the code that handles the Service
resource to figure out how it detects what should be the default
provider.

Thanks again...James

On Wed, Mar 25, 2015 at 8:17 PM, Felix Frank
felix.fr...@alumni.tu-berlin.de wrote:
 Hi,

 it sure is disappointing that the most recent agent version will not
 select the correct default provider on your FC19. Is systemd default on
 this platform? Or have you configured this box this way explicitly.

 If you want your manifest to behave like this on your FC19 boxen only,
 you can do this on the global scope (e.g., site.pp)

 if $operatingsystem == 'Fedora' and $operatingsystemmajrelease == '19' {
 Service { provider = 'systemd' }
 }

 This sets a resource default if the node in question uses the specified
 operating system.

 HTH,
 Felix

 On 03/13/2015 03:05 PM, James Olin Oden wrote:
 I am on Fedora Core 19 using Puppet version 3.7.4.

 When I was trying ensure a service was configured to start I would do
 something like:

service { 'someservice':
ensure = 'running',
enable = true,
}

 But when I would run puppet apply I would get the following error:

Error: Could not enable someservice: Execution of '/sbin/chkconfig
 --add someservice'
returned 1: error reading information on service someservice: No such 
 file or
 directory
Error: /Stage[main]/Firewall::Linux::Redhat/Service[someservice]/ensure:
 change
 from stopped to running failed: Could not enable someservice: Execution of
 '/sbin/chkconfig --add someservice' returned 1: error reading information on
 service someservice: No such file or directory

 However if I told it the provider like:


service { 'someservice':
ensure = 'running',
enable = true,
provider = 'systemd',
}

 The puppet apply would work fine.   This however makes my resource non
 portable to systems not using systemd.   Is this a bug of some sort?
 Am I doing something wrong?

 Thanks...James


 --
 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/55135030.5070104%40Alumni.TU-Berlin.de.
 For more options, visit https://groups.google.com/d/optout.

-- 
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/CAPWHxf%2BTHBnoyBv6s-SSZT1muY_5jzgofnns4c2uDDR54iBVdg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: Puppetlabs-mysql with Percona

2015-03-26 Thread Matt Shields
Not sure why but it looks like when trying to start Percona, it couldn't
create a pid file because there was no /var/run/mysql directory and no
permissions set.  I had to manually create the folder and set permissions,
now it seems to be working.

 15   package { 'percona-release':
 16 ensure   = present,
 17 source   = '
http://www.percona.com/downloads/percona-release/redhat/0.1-3/perc
 18 provider = rpm,
 19   }
 20
 21   file { '/var/run/mysql':
 22 ensure = directory,
 23 owner  = 'mysql',
 24 group  = 'mysql',
 25   }
 26
 27   $override_options = {
 28 'mysqld'= {
 29   'bind-address'= '0.0.0.0',
 30   'max_connections' = '1024',
 31   'pid-file'= '/var/run/mysql/mysqld.pid',
 32   #  'disable-ssl' = true,
 33 }
 34   }
 35
 36   class { '::mysql::server':
 37 package_name= 'Percona-Server-server-56',
 38 root_password   = ${percona_root},
 39 #remove_default_accounts = true,
 40 service_name= 'mysql',
 41 override_options= $override_options,
 42 require = [ Package['percona-release'] ],
 43   }

Matt

On Thu, Mar 26, 2015 at 8:43 AM, Matt Shields m...@mattshields.org wrote:

 I've tried setting the service_name to mysql in the class definition since
 Percona calls the service mysql instead of mysqld, but I'm still getting
 errors.  Looks like it's now trying to start Percona/mysql but getting
 errors.  Here's the puppet output plus the mysql log.


  31   class { '::mysql::server':
  32 package_name= 'Percona-Server-server-56',
  33 root_password   = ${percona_root},
  34 #remove_default_accounts = true,
  35 service_name= 'mysql',
  36 override_options= $override_options,
  37 require = [ Package['percona-release'] ],
  38   }

 Info: Retrieving pluginfacts
 Info: Retrieving plugin
 Info: Loading facts
 Info: Caching catalog for bidb001
 Info: Applying configuration version '1427372678'
 Notice: /Stage[main]/Profile::Bidb/Package[percona-release]/ensure: created
 Notice: /Stage[main]/Mysql::Server::Install/Package[mysql-server]/ensure:
 created
 Notice: /Stage[main]/Mysql::Server::Config/File[/etc/mysql]/ensure: created
 Notice: /Stage[main]/Mysql::Server::Config/File[/etc/my.cnf]/ensure:
 defined content as '{md5}b5f7f94eab5170143b230460be142427'
 Notice: /Stage[main]/Mysql::Server::Config/File[/etc/mysql/conf.d]/ensure:
 created
 Error: Could not start Service[mysqld]: Execution of '/sbin/service mysql
 start' returned 1: Starting MySQL (Percona Server).. ERROR! The server quit
 without updating PID file (/var/run/mysqld.pid).
 Wrapped exception:
 Execution of '/sbin/service mysql start' returned 1: Starting MySQL
 (Percona Server).. ERROR! The server quit without updating PID file
 (/var/run/mysqld.pid).
 Error: /Stage[main]/Mysql::Server::Service/Service[mysqld]/ensure: change
 from stopped to running failed: Could not start Service[mysqld]: Execution
 of '/sbin/service mysql start' returned 1: Starting MySQL (Percona
 Server).. ERROR! The server quit without updating PID file
 (/var/run/mysqld.pid).
 Error: Could not prefetch mysql_user provider 'mysql': Execution of
 '/usr/bin/mysql -NBe SELECT CONCAT(User, '@',Host) AS User FROM mysql.user'
 returned 1: ERROR 2002 (HY000): Can't connect to local MySQL server through
 socket '/var/lib/mysql/mysql.sock' (111)
 Notice: /Stage[main]/Mysql::Server::Root_password/Mysql_user[root@localhost]:
 Dependency Service[mysqld] has failures: true
 Warning:
 /Stage[main]/Mysql::Server::Root_password/Mysql_user[root@localhost]:
 Skipping because of failed dependencies
 Notice: /Stage[main]/Mysql::Server::Root_password/File[/root/.my.cnf]:
 Dependency Service[mysqld] has failures: true
 Warning: /Stage[main]/Mysql::Server::Root_password/File[/root/.my.cnf]:
 Skipping because of failed dependencies
 Notice: /Stage[main]/Mysql::Server/Anchor[mysql::server::end]: Dependency
 Service[mysqld] has failures: true
 Warning: /Stage[main]/Mysql::Server/Anchor[mysql::server::end]: Skipping
 because of failed dependencies
 Notice: Finished catalog run in 25.16 seconds

 [root@bidb001 ~]# cat /var/log/mysqld.log
 150326 12:31:45 mysqld_safe Starting mysqld daemon with databases from
 /var/lib/mysql
 2015-03-26 12:31:45 0 [Warning] TIMESTAMP with implicit DEFAULT value is
 deprecated. Please use --explicit_defaults_for_timestamp server option (see
 documentation for more details).
 2015-03-26 12:31:45 21937 [Warning] Using unique option prefix
 myisam_recover instead of myisam-recover-options is deprecated and will be
 removed in a future release. Please use the full name instead.
 2015-03-26 12:31:45 21937 [Note] Plugin 'FEDERATED' is disabled.
 2015-03-26 12:31:45 21937 [Note] InnoDB: Using atomics to ref count buffer
 pool pages
 2015-03-26 12:31:45 21937 [Note] InnoDB: The InnoDB memory heap is disabled
 2015-03-26 12:31:45 

Re: [Puppet Users] Re: Puppetlabs-mysql with Percona

2015-03-26 Thread Matt Shields
I've tried setting the service_name to mysql in the class definition since
Percona calls the service mysql instead of mysqld, but I'm still getting
errors.  Looks like it's now trying to start Percona/mysql but getting
errors.  Here's the puppet output plus the mysql log.


 31   class { '::mysql::server':
 32 package_name= 'Percona-Server-server-56',
 33 root_password   = ${percona_root},
 34 #remove_default_accounts = true,
 35 service_name= 'mysql',
 36 override_options= $override_options,
 37 require = [ Package['percona-release'] ],
 38   }

Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for bidb001
Info: Applying configuration version '1427372678'
Notice: /Stage[main]/Profile::Bidb/Package[percona-release]/ensure: created
Notice: /Stage[main]/Mysql::Server::Install/Package[mysql-server]/ensure:
created
Notice: /Stage[main]/Mysql::Server::Config/File[/etc/mysql]/ensure: created
Notice: /Stage[main]/Mysql::Server::Config/File[/etc/my.cnf]/ensure:
defined content as '{md5}b5f7f94eab5170143b230460be142427'
Notice: /Stage[main]/Mysql::Server::Config/File[/etc/mysql/conf.d]/ensure:
created
Error: Could not start Service[mysqld]: Execution of '/sbin/service mysql
start' returned 1: Starting MySQL (Percona Server).. ERROR! The server quit
without updating PID file (/var/run/mysqld.pid).
Wrapped exception:
Execution of '/sbin/service mysql start' returned 1: Starting MySQL
(Percona Server).. ERROR! The server quit without updating PID file
(/var/run/mysqld.pid).
Error: /Stage[main]/Mysql::Server::Service/Service[mysqld]/ensure: change
from stopped to running failed: Could not start Service[mysqld]: Execution
of '/sbin/service mysql start' returned 1: Starting MySQL (Percona
Server).. ERROR! The server quit without updating PID file
(/var/run/mysqld.pid).
Error: Could not prefetch mysql_user provider 'mysql': Execution of
'/usr/bin/mysql -NBe SELECT CONCAT(User, '@',Host) AS User FROM mysql.user'
returned 1: ERROR 2002 (HY000): Can't connect to local MySQL server through
socket '/var/lib/mysql/mysql.sock' (111)
Notice: /Stage[main]/Mysql::Server::Root_password/Mysql_user[root@localhost]:
Dependency Service[mysqld] has failures: true
Warning: /Stage[main]/Mysql::Server::Root_password/Mysql_user[root@localhost]:
Skipping because of failed dependencies
Notice: /Stage[main]/Mysql::Server::Root_password/File[/root/.my.cnf]:
Dependency Service[mysqld] has failures: true
Warning: /Stage[main]/Mysql::Server::Root_password/File[/root/.my.cnf]:
Skipping because of failed dependencies
Notice: /Stage[main]/Mysql::Server/Anchor[mysql::server::end]: Dependency
Service[mysqld] has failures: true
Warning: /Stage[main]/Mysql::Server/Anchor[mysql::server::end]: Skipping
because of failed dependencies
Notice: Finished catalog run in 25.16 seconds

[root@bidb001 ~]# cat /var/log/mysqld.log
150326 12:31:45 mysqld_safe Starting mysqld daemon with databases from
/var/lib/mysql
2015-03-26 12:31:45 0 [Warning] TIMESTAMP with implicit DEFAULT value is
deprecated. Please use --explicit_defaults_for_timestamp server option (see
documentation for more details).
2015-03-26 12:31:45 21937 [Warning] Using unique option prefix
myisam_recover instead of myisam-recover-options is deprecated and will be
removed in a future release. Please use the full name instead.
2015-03-26 12:31:45 21937 [Note] Plugin 'FEDERATED' is disabled.
2015-03-26 12:31:45 21937 [Note] InnoDB: Using atomics to ref count buffer
pool pages
2015-03-26 12:31:45 21937 [Note] InnoDB: The InnoDB memory heap is disabled
2015-03-26 12:31:45 21937 [Note] InnoDB: Mutexes and rw_locks use GCC
atomic builtins
2015-03-26 12:31:45 21937 [Note] InnoDB: Memory barrier is not used
2015-03-26 12:31:45 21937 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-03-26 12:31:45 21937 [Note] InnoDB: Using Linux native AIO
2015-03-26 12:31:45 21937 [Note] InnoDB: Using CPU crc32 instructions
2015-03-26 12:31:45 21937 [Note] InnoDB: Initializing buffer pool, size =
128.0M
2015-03-26 12:31:45 21937 [Note] InnoDB: Completed initialization of buffer
pool
2015-03-26 12:31:45 21937 [Note] InnoDB: Highest supported file format is
Barracuda.
2015-03-26 12:31:45 21937 [Note] InnoDB: 128 rollback segment(s) are active.
2015-03-26 12:31:45 21937 [Note] InnoDB: Waiting for purge to start
2015-03-26 12:31:45 21937 [Note] InnoDB:  Percona XtraDB (
http://www.percona.com) 5.6.23-72.1 started; log sequence number 1625987
2015-03-26 12:31:45 21937 [Warning] No existing UUID has been found, so we
assume that this is the first time that this server has been started.
Generating a new UUID: 10f307f6-d3b4-11e4-acac-12c330e0d72c.
2015-03-26 12:31:45 21937 [Warning] Failed to setup SSL
2015-03-26 12:31:45 21937 [Warning] SSL error:
SSL_CTX_set_default_verify_paths failed
2015-03-26 12:31:45 21937 [Note] RSA private key file not found:
/var/lib/mysql//private_key.pem. Some authentication 

Re: [Puppet Users] Help! Could not autoload puppet/provider/package/rpm

2015-03-26 Thread staceytian4321
Wil,

Thank you for the reply.

Yes, I checked and found that SELinux was enabled post-install.

Then I set SELinux to Permissive and reinstall everything, but still same 
error.

Can you explain more detail about `restorecon -n -v -r /`?

Thanks,
Stacey




On Monday, March 23, 2015 at 3:11:40 PM UTC-4, Wil Cooley wrote:

 On Mon, Mar 23, 2015 at 6:35 AM staceyt...@gmail.com javascript: 
 wrote:

 Hi all,

 I am using Puppet agent 3.7.3 on Red Hat Linux. On one of my machines, when 
 I run puppet agent --test, I received error:

 Puppet (err): Could not autoload puppet/provider/package/rpm: No such file 
 or directory - /tmp/puppet20150323-27791-6xy78b.lock
 Puppet (err): Could not autoload puppet/type/package: Could not autoload 
 puppet/provider/package/rpm: No such file or directory - 
 /tmp/puppet20150323-27791-6xy78b.lock
 Puppet (err): Could not retrieve catalog from remote server: Could not 
 intern from text/pson: Could not autoload puppet/type/package: Could not 
 autoload puppet/provider/package/rpm: No such file or directory - 
 /tmp/puppet20150323-27791-6xy78b.lock
 Puppet (err): Could not retrieve catalog; skipping run

 Any clue why this happens? 


 SELinux enabled post-install, so various bits don't have the right labels?

 It might take a while, but restorecon(8) might help? Maybe start with 
 `restorecon -n -v -r /`?

 Wil 


-- 
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/83f8cf17-1ab5-4c86-8472-85c5351d1858%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] How to setup Puppet agent run interval at a specific time?

2015-03-26 Thread staceytian4321
Hi all,

I am using puppet 3.7.3.

I want my puppet agent to run twice a day, so in puppet.conf, I set 
runinterval:

#  This setting can be a time interval in seconds (30 or 30s), minutes 
(30m), hours (6h), days(2d), or years (5y)
 runinterval = 12h

However, how could I setup the puppet agent run to happen at a specific 
time? 
For example, 2:00am and 2:00pm respectively?

Now it seems random. And whenever the machine is rebooted, it will run 
puppet agent.

Thanks,
Zaiwen

-- 
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/c97554da-5967-41d9-8943-50e5750f8ab5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] misbehaving file resource on only one server

2015-03-26 Thread Gabriel Filion
On 24/03/15 05:03 PM, Christopher Wood wrote:
 On Tue, Mar 24, 2015 at 04:30:27PM -0400, Gabriel Filion wrote:
 I'm having issues with one server when it tries to apply a super simple
 file resource that ensures a file is absent:

 file { '/etc/munin/plugin-conf.d/uptime.conf': ensure = absent }

 I can easily replicate this with a puppet apply -e of the above line.

 I get the following error:

 err: /Stage[main]//File[/etc/munin/plugin-conf.d/uptime.conf]: Could not
 evaluate: undefined method `[]=' for :chec:Symbol

 The weird thing is that it's the only server where this is happening.
 Other servers that are using the same package versions can apply the
 same resource without any issue.

 I'm using the debian packages from wheezy, so puppet 2.7.23 with ruby 1.9.1
 
 It reminds me vaguely of something I found in wheezy but I may have typo'ed 
 the version number, and you're getting a different error.
 
 https://groups.google.com/forum/#!msg/puppet-users/4rk31Q1IzNY/g8mBTaXrRCIJ
 
 https://projects.puppetlabs.com/issues/14599
 
 https://github.com/puppetlabs/puppet/commit/b572810ed20734eca88358ebdc757674a9af3c00

it doesn't look like what I'm seeing unfortunatly, plus:

 You might check if the whole directory path exists, and if you get the same 
 error after mkdir -p /etc/munin/plugin-conf.d/.

the path /etc/munin/plugin-conf.d/ already exists and has a bunch files
in it already (all managed by puppet, too).

 Failing that, strace'ing might show you something more useful.

I'll see what I can find with strace...

 This happens whether I configure ruby 1.9.1 or 1.8.7 as the version to
 run with the ruby executable.

 Has anyone already seen such a problem before? is there any more setup
 info that I should verify to find differences between the working
 servers and the one that isn't?

-- 
Gabriel Filion

-- 
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/5514DF20.3070709%40lelutin.ca.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: OpenPGP digital signature


Re: [Puppet Users] misbehaving file resource on only one server

2015-03-26 Thread Alex Harvey
Providing this isn't a production host, I'd use locate to find the file 
posix.rb (that's your built-in file provider), then insert some puts 
statements to see if you can find out exactly where in the code it's 
failing.

On Friday, March 27, 2015 at 3:49:24 PM UTC+11, Gabriel Filion wrote:

 On 27/03/15 12:40 AM, Gabriel Filion wrote: 
  Failing that, strace'ing might show you something more useful. 
  I'll see what I can find with strace... 

 unfortunately, nothing really useful.. 

 in the output below, the first file access gives the same error as the 
 one failing, but seems to work ok: 

 lstat(/etc/munin/plugin-conf.d/if_err_eth0.conf, 0x7fff125de9c0) = -1 
 ENOENT (No such file or directory) 
 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 
 gettimeofday({1427430950, 856657}, NULL) = 0 
 gettimeofday({1427430950, 856828}, NULL) = 0 
 gettimeofday({1427430950, 856904}, NULL) = 0 
 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 
 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 
 gettimeofday({1427430950, 857379}, NULL) = 0 
 gettimeofday({1427430950, 857540}, NULL) = 0 
 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 
 gettimeofday({1427430950, 857827}, NULL) = 0 
 gettimeofday({1427430950, 857970}, NULL) = 0 
 lstat(/etc/munin/plugin-conf.d/uptime.conf, 0x7fff125de9c0) = -1 
 ENOENT (No such file or directory) 
 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 
 gettimeofday({1427430950, 858358}, NULL) = 0 
 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 
 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 
 gettimeofday({1427430950, 858793}, NULL) = 0 
 gettimeofday({1427430950, 859145}, NULL) = 0 
 sendto(3, 27Mar 27 00:35:50 puppet-agent..., 191, MSG_NOSIGNAL, 
 NULL, 0) = 191 
 write(1, \33[1;35merr: /Stage[main]/Site_mu..., 165err: 
 /Stage[main]/Site_munin/Munin::Plugin[uptime]/File[/etc/munin/plugin-conf.d/uptime.conf]:
  

 Could not 
 evaluate: undefined method `[]=' for :chec:Symbol) = 165 
 write(1, \n, 1 
 )   = 1 
 gettimeofday({1427430950, 859715}, NULL) = 0 
 gettimeofday({1427430950, 859788}, NULL) = 0 
 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 
 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 
 gettimeofday({1427430950, 860310}, NULL) = 0 
 gettimeofday({1427430950, 860568}, NULL) = 0 
 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 
 gettimeofday({1427430950, 860877}, NULL) = 0 
 gettimeofday({1427430950, 861091}, NULL) = 0 

 -- 
 Gabriel Filion 


-- 
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/c065c1cd-7611-4d82-a9db-144ba0f22c2c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] misbehaving file resource on only one server

2015-03-26 Thread Gabriel Filion
On 27/03/15 12:40 AM, Gabriel Filion wrote:
 Failing that, strace'ing might show you something more useful.
 I'll see what I can find with strace...

unfortunately, nothing really useful..

in the output below, the first file access gives the same error as the
one failing, but seems to work ok:

lstat(/etc/munin/plugin-conf.d/if_err_eth0.conf, 0x7fff125de9c0) = -1
ENOENT (No such file or directory)
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
gettimeofday({1427430950, 856657}, NULL) = 0
gettimeofday({1427430950, 856828}, NULL) = 0
gettimeofday({1427430950, 856904}, NULL) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
gettimeofday({1427430950, 857379}, NULL) = 0
gettimeofday({1427430950, 857540}, NULL) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
gettimeofday({1427430950, 857827}, NULL) = 0
gettimeofday({1427430950, 857970}, NULL) = 0
lstat(/etc/munin/plugin-conf.d/uptime.conf, 0x7fff125de9c0) = -1
ENOENT (No such file or directory)
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
gettimeofday({1427430950, 858358}, NULL) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
gettimeofday({1427430950, 858793}, NULL) = 0
gettimeofday({1427430950, 859145}, NULL) = 0
sendto(3, 27Mar 27 00:35:50 puppet-agent..., 191, MSG_NOSIGNAL,
NULL, 0) = 191
write(1, \33[1;35merr: /Stage[main]/Site_mu..., 165err:
/Stage[main]/Site_munin/Munin::Plugin[uptime]/File[/etc/munin/plugin-conf.d/uptime.conf]:
Could not
evaluate: undefined method `[]=' for :chec:Symbol) = 165
write(1, \n, 1
)   = 1
gettimeofday({1427430950, 859715}, NULL) = 0
gettimeofday({1427430950, 859788}, NULL) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
gettimeofday({1427430950, 860310}, NULL) = 0
gettimeofday({1427430950, 860568}, NULL) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
gettimeofday({1427430950, 860877}, NULL) = 0
gettimeofday({1427430950, 861091}, NULL) = 0

-- 
Gabriel Filion

-- 
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/5514E140.4050406%40lelutin.ca.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Creating a list of hosts

2015-03-26 Thread Felix Frank
On 03/26/2015 05:29 PM, Peter Berghold wrote:
 
 I watched the puppetdb log and it would seem something is being written
 to puppetdb and puppetdb is the backend for storeconfigs. 

Have you tried actually querying the PuppetDB contents?

https://docs.puppetlabs.com/puppetdb/latest/api/query/v2/resources.html

-- 
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/551445C5.7060102%40alumni.tu-berlin.de.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Creating a list of hosts

2015-03-26 Thread Peter Berghold
I need a push in the right direction.  I have a need to have a subset of
hosts in my environment register themselves to receive rsync updates from
a central host.  I realize that the right approach is exported resources
but I'm getting stuck on the actual implementation.

Here is what I tried:

in one module

define registerhost() {
 include parms
 concat::fragment($fqdn fragment:
   content = ${fqdn},
   target=${parms::filenmae}
  }
}

and elsewhere

@@registerhost {${fqdn}: }

and then to marshal the resources

concat { ${parms::filename}:
  ensure = present,
   backup= true,
   owner = root, group= root, mode = 0644
  }

  Registerhost ||

What I'm seeing is
/usr/local/etc/remote-masters.txt]/returns: The fragments directory is
empty, cowardly refusing to make empty config files


I watched the puppetdb log and it would seem something is being written to
puppetdb and puppetdb is the backend for storeconfigs.

so... suggestions?

-- 
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/CAArvnv22a%3DOf_5XX%3DPocetco_pLKt89%3DHNsrhc5Fny5kgwhpRg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Creating a list of hosts

2015-03-26 Thread Felix Frank
On 03/26/2015 07:39 PM, Peter Berghold wrote:

 I guess you can't export such a thing?

You can. But your define is not called 'remotemaster'. Perhaps that is
the cause of the error.

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/551466F6.9090807%40Alumni.TU-Berlin.de.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Announcing Puppet Enterprise 3.8

2015-03-26 Thread Tim Zonca


Earlier this morning, we announced the upcoming release of Puppet 
Enterprise 3.8. With the latest version, we're adding support for 
provisioning Docker containers, AWS cloud environments and bare metal. 
We're also introducing new ways to manage infrastructure as code, plus much 
more.


Discover what's new in Puppet Enterprise 3.8: 
http://puppetlabs.com/puppet/whats-new


New capabilities in Puppet Enterprise 3.8 to include:


* Support for provisioning Docker containers, AWS cloud environments, and 
bare metal environments

* The new Puppet Code Manager app, which uses r10k, to help you efficiently 
manage your Puppet code

* A new set of upgrade tools for node classification make it easier to 
leverage the latest and greatest capabilities available in Puppet Enterprise


Dive deeper into each of the latest capabilities via our Puppet Enterprise 
3.8 Upgrade Series: 
http://info.puppetlabs.com/puppet-enterprise-3-8-upgrade-series.html


We look forward to sharing a sneak peek of the latest release!

-- 
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/1c073949-e6dc-4dfb-9f79-7c275b4514b6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Creating a list of hosts

2015-03-26 Thread Jeffrey Watts
On Thu, Mar 26, 2015 at 11:29 AM, Peter Berghold salty.cowd...@gmail.com
wrote:

 I need a push in the right direction.  I have a need to have a subset of
 hosts in my environment register themselves to receive rsync updates from
 a central host.  I realize that the right approach is exported resources
 but I'm getting stuck on the actual implementation.


Hi!  I'd recommend you look at the wonderful puppetdb-query:
https://github.com/dalen/puppet-puppetdbquery

I use it to extract hostnames from PuppetDB to populate various things.
It's been a long time since I set this up but it should be as simple as
installing the module and doing something like this:

manifests/init.pp:

   $all_hosts = query_nodes('kernel=Linux')

file { 'fqdns.txt':
  content   = template('test/fqdns.erb'),
  ensure= file,
  path   = '/foo/bar/fqdns',
}

templates/fqdns.erb:

%- all_hosts.each do |fqdn| -%
%= fqdn %
%- end -%

Hope this helps!
Jeffrey.

-- 
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/CAMvPdm1yWn11x0KNf7CVwJ0hDG%3D%3DR4-Wo0po60a-hDH2Qsi90A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Problem with order and ensure_resource.

2015-03-26 Thread Shawn Sterling
Using:
puppetserver-1.0.2-1.el7.noarch
puppet-3.7.4-1.el7.noarch

Doing roles and profiles. Have a define setup to add 'includepkgs' items to 
different yum repos (for security reasons).

In my redis profile if I do this:

$epel_packages = ['redis', 'jemalloc']
repo::epel::add { $epel_packages: } -
package { $epel_packages:
  ensure = installed,
}

The resource chaining works as expected.

If I try to chain an ensure_resource:

repo::epel::add { $epel_packages: } -
ensure_resource('package', $epel_packages, {
  'ensure'  = 'present',
})

This gives Error 400 on SERVER: Syntax error at '}' at line x

If I get rid of the - the 400 goes away, but we need 2 puppet runs 
because the package install attempt happens before the package is added to 
the includepkgs 

What I'm really trying to do is, use the define and then call an external 
module after. Ideally: 

repo::epel::add { $epel_packages: } -
class { '::redis':
  manage_repo = false,
}

But this requires 2 puppet runs because arioch's puppet-redis module uses 
ensure_resource which seams to ignores chaining and other attempts to 
ensure order in the profile such as:

repo::epel::add { $epel_packages: }
class { '::redis':
  manage_repo = false,
  require = Repo::Epel::Add[$epel_packages],
}

# or

repo::epel::add { $epel_packages: }
class { '::redis':
  manage_repo = false,
}
Repo::Epel::Add[$epel_packages] - Class['::redis']

# or

repo::epel::add { $epel_packages:
  before = Class['::redis'],
}
class { '::redis':
  manage_repo = false,
}

Which none of the 3 work. Each requires 2 puppet runs, the first full of 
errors.

You could tell me to not use ensure_resources, but I'm not. I'm using 
someone else's module and trying to enforce order at the profile level.

I could modify the redis module, or maybe send him a pull request to get 
rid of the ensure_resource (which word on the street says ensure_resources 
are as bad as using evals); but I'm guessing there is a puppety way to 
handle this that I'm not finding; or maybe it's a bug that ensure_resource 
ignores all (of my) attempts to assign order? 

Any Ideas?

Have a good day.

-Shawn

-- 
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/701e7c6e-07e6-4139-90c3-256507e9bc05%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Need help! Puppet could not request certificate: No route to host -connect(2)

2015-03-26 Thread Vishal Biyani
+1 to iptables -F

I was saving exactly same issue on a setup I created using Vagrant - one 
master and some slaves. The agents won't connect to master no matter what 
ping/ssh etc. said. Telnet didn't work of course in spite of all other 
right configurations. Thanks for making my day!

On Tuesday, April 23, 2013 at 8:27:02 PM UTC+5:30, mart...@gmail.com wrote:

 Hello,

 I am installing puppet and keep getting this error [Puppet could not 
 request certificate:  No route to host -connect(2)]

 My DNS is resloving and i can ping the master from the agent.  

 I have added this line to the iptables [iptables  -I INPUT -s 192.168.1.20 
 -m tcp -p tcp --dport 8140 -j ACCEPT], where the IP is my agent.

 I have also added my master ip to /etc/puppet/puppet.conf

 Why am I still getting this error?  



-- 
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/d80656ab-57d6-4bb5-8a64-c8b2e66806ea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Creating a list of hosts

2015-03-26 Thread Jeffrey Watts
Put the puppetdb directory in /etc/puppet/modules.

Good luck.
Jeffrey.

On Thu, Mar 26, 2015 at 3:58 PM, Peter Berghold salty.cowd...@gmail.com
wrote:

 OK... excuse me for being a bit dense... but how do you install this
 thing?  i've unzipped it and it isn't very obvious to me...


-- 
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/CAMvPdm0pmOYTcVZqjJUxXAN553e%3DiRoXCfrxL-8kU9zeCx6DYQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Creating a list of hosts

2015-03-26 Thread Peter Berghold
puppetdbquery looks worth looking into...

On Thu, Mar 26, 2015 at 4:07 PM Felix Frank felix.fr...@alumni.tu-berlin.de
wrote:

 On 03/26/2015 07:39 PM, Peter Berghold wrote:
 
  I guess you can't export such a thing?

 You can. But your define is not called 'remotemaster'. Perhaps that is
 the cause of the error.

 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/551466F6.9090807%40Alumni.TU-Berlin.de.
 For more options, visit https://groups.google.com/d/optout.


-- 
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/CAArvnv2qBvKZUG9d_roD8XYAJpEZ8_xN-FPwEAZ6mwFGpTzgcA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Creating a list of hosts

2015-03-26 Thread Peter Berghold
OK... excuse me for being a bit dense... but how do you install this thing?
 i've unzipped it and it isn't very obvious to me...

On Thu, Mar 26, 2015 at 4:47 PM Peter Berghold salty.cowd...@gmail.com
wrote:

 puppetdbquery looks worth looking into...

 On Thu, Mar 26, 2015 at 4:07 PM Felix Frank 
 felix.fr...@alumni.tu-berlin.de wrote:

 On 03/26/2015 07:39 PM, Peter Berghold wrote:
 
  I guess you can't export such a thing?

 You can. But your define is not called 'remotemaster'. Perhaps that is
 the cause of the error.

 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/ms
 gid/puppet-users/551466F6.9090807%40Alumni.TU-Berlin.de.
 For more options, visit https://groups.google.com/d/optout.



-- 
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/CAArvnv3PyH1qhj2m%2BSPB%2BwOqe09oVsHp%2Bq8XEc6NW3KOxH7iJg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Creating a list of hosts

2015-03-26 Thread Peter Berghold
Ok... I thought so... thanks

On Thu, Mar 26, 2015, 18:18 Jeffrey Watts jeffrey.w.wa...@gmail.com wrote:

 Put the puppetdb directory in /etc/puppet/modules.

 Good luck.
 Jeffrey.


 On Thu, Mar 26, 2015 at 3:58 PM, Peter Berghold salty.cowd...@gmail.com
 wrote:

 OK... excuse me for being a bit dense... but how do you install this
 thing?  i've unzipped it and it isn't very obvious to me...


  --
 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/CAMvPdm0pmOYTcVZqjJUxXAN553e%3DiRoXCfrxL-8kU9zeCx6DYQ%40mail.gmail.com
 https://groups.google.com/d/msgid/puppet-users/CAMvPdm0pmOYTcVZqjJUxXAN553e%3DiRoXCfrxL-8kU9zeCx6DYQ%40mail.gmail.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.


-- 
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/CAArvnv1txzeotzwEMg_yDVk0T%3DhYNnUJRMvvSkTN5g2N7HrgPA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Puppet Example42/Nagios Module

2015-03-26 Thread Alessandro Franceschi
Hi Sergiu,
currently ex42/nagios module has not a dedicated define to add a nagios 
host objects directly.
It'd quite trivial to do that but currently you can do that, with that 
module, providing your config file(s) with the host objects you need as 
plain files (with one or more hosts), or have a small wrapper defines that 
creates the file for you and is used by the create_resource function feeded 
by an hash you can have on hiera.

I personally prefer icinga2 nowadays, as it allows me to automate 
monitoring minimising the number of exported resources (I export only host 
resources) and managing what services to check on what hosts using Icinga2 
apply rules. Your mileage may vary.

Best
al

On Wednesday, March 25, 2015 at 12:25:07 PM UTC+1, Sergiu Cornea wrote:

 Hi Al,

 Thank you for your answer.

 What I am trying to do is as follows:

 I have successfully installed Nagios server on CentOS 6.6 using Puppet and 
 example42/nagios module. I have also added a new host with some checks and 
 works like a charm. However I was looking around trying to understand how 
 should I go about when I want to add a host such as localhost.cfg, just by 
 passing the required variables to the Hiera file. I have tried to use 
 nagios::host and nagios::target but doesn't seem to work, all I get it is 
 that the run was successful but nothing has been applied.

 Do you think that I should use Icinga2?

 Thank you for quick reply and for your answer.

 Regards,
 Sergiu 

 On Wednesday, March 25, 2015 at 11:12:25 AM UTC, Alessandro Franceschi 
 wrote:

 Do you want to add automatically new hosts on Nagios using exported 
 resources or you want to define your hosts statically with a bunch of 
 (hiera) data?

 Hiera entries for this module are as the ones you may expect from other 
 modules, for each class parameter there's a hiera lookup to the key: 
 $classname::parametername (for example nagios::template to define a custom 
 template for your nagios.cfg)

 Finally, if you want to automate your monitoring setup (new hosts are 
 automatically added to the nagios server using Puppet's exported resources) 
 I'd recommend definitively to use Icinga2 instead of Nagios. This allows 
 much easier and more compact management of the exported resources 
 (basically you can just export host resources, and you don't need to export 
 any service check resource)
  
 al



 On Wednesday, March 25, 2015 at 10:38:19 AM UTC+1, Sergiu Cornea wrote:

 Good morning everyone,

 I am using Puppet 3.7 and the example42/nagios module. As I am a Puppet 
 newbie I have tried to create hosts using hiera but it doesn't work. I have 
 google it but I am just getting the example42/network module example for 
 hiera.

 Could someone guide me into the right direction on how I will go about 
 create a Hiera entry for this module?

 Thank you,

 Regards,
 Sergiu

 This message and its attachments are private and confidential. If you 
 have received this message in error, please notify the sender and remove it 
 and its attachments from your system.

 The University of Westminster is a charity and a company 
 limited by guarantee. Registration number: 977818 England. 
 Registered Office: 309 Regent Street, London W1B 2UW.


 This message and its attachments are private and confidential. If you have 
 received this message in error, please notify the sender and remove it and 
 its attachments from your system.

 The University of Westminster is a charity and a company 
 limited by guarantee. Registration number: 977818 England. 
 Registered Office: 309 Regent Street, London W1B 2UW.


-- 
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/73846d5d-f476-4e25-9b17-d8ca1ea9717b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Trouble with service resource detecting systemd as provider on FC19

2015-03-26 Thread James Olin Oden
snip
 It appears[1] that systemd should work without modification on FC19.
 James, what version of facter do you have? Most importantly does it have
 a fact for operatingsystemmajrelease?

It does:

   [root@jefe ~]# facter | grep  operatingsystemmajrelease
   operatingsystemmajrelease = 19

Best...James

-- 
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/CAPWHxfL4BcKA0%2BiaPp7puUnrLckJd_7Dex6cE88Yh8Af1%2B5CTg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Trouble with service resource detecting systemd as provider on FC19

2015-03-26 Thread Garrett Honeycutt
On 3/26/15 1:17 AM, Felix Frank wrote:
 Hi,
 
 it sure is disappointing that the most recent agent version will not
 select the correct default provider on your FC19. Is systemd default on
 this platform? Or have you configured this box this way explicitly.
 
 If you want your manifest to behave like this on your FC19 boxen only,
 you can do this on the global scope (e.g., site.pp)
 
 if $operatingsystem == 'Fedora' and $operatingsystemmajrelease == '19' {
 Service { provider = 'systemd' }
 }
 
 This sets a resource default if the node in question uses the specified
 operating system.
 
 HTH,
 Felix
 
 On 03/13/2015 03:05 PM, James Olin Oden wrote:
 I am on Fedora Core 19 using Puppet version 3.7.4.

 When I was trying ensure a service was configured to start I would do
 something like:

service { 'someservice':
ensure = 'running',
enable = true,
}

 But when I would run puppet apply I would get the following error:

Error: Could not enable someservice: Execution of '/sbin/chkconfig
 --add someservice'
returned 1: error reading information on service someservice: No such 
 file or
 directory
Error: /Stage[main]/Firewall::Linux::Redhat/Service[someservice]/ensure:
 change
 from stopped to running failed: Could not enable someservice: Execution of
 '/sbin/chkconfig --add someservice' returned 1: error reading information on
 service someservice: No such file or directory

 However if I told it the provider like:


service { 'someservice':
ensure = 'running',
enable = true,
provider = 'systemd',
}

 The puppet apply would work fine.   This however makes my resource non
 portable to systems not using systemd.   Is this a bug of some sort?
 Am I doing something wrong?

 Thanks...James

 

Hi,

+1 to Felix's hack for getting this working.

It appears[1] that systemd should work without modification on FC19.
James, what version of facter do you have? Most importantly does it have
a fact for operatingsystemmajrelease?

Looks like the redhat provider would also match[2]. Anyone know how
precedence is determined?


[1] -
https://github.com/puppetlabs/puppet/blob/master/lib/puppet/provider/service/systemd.rb#L10

[2] -
https://github.com/puppetlabs/puppet/blob/master/lib/puppet/provider/service/redhat.rb#L11

Best regards,
-g

-- 
Garrett Honeycutt
@learnpuppet
Puppet Training with LearnPuppet.com
Mobile: +1.206.414.8658

-- 
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/551418FD.7030101%40garretthoneycutt.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] r10k best practices in production environment

2015-03-26 Thread Tim Meusel
Hi,

there are several links available:

https://blog.bastelfreak.de/?p=990
http://garylarizza.com/blog/2014/08/31/r10k-plus-directory-environments/
http://somethingsinistral.net/blog/r10k-140/
http://rnelson0.com/?s=r10k

let us know if you have specific questions

On 25.03.2015 20:41, Vijayabalan Balakrishnan wrote:
 Dear Team,

 I am doing POC project in r10k for automating the puppet environment to 
 manage modules.Is there any place where we can study the best practices for 
 r10k tool.So that we can plan well fr our production environment.

 Kindly help me on this...

 Thanks,
 BVIJAY


-- 
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/55141CB5.9040304%40googlemail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] How to setup Puppet agent run interval at a specific time?

2015-03-26 Thread Garrett Honeycutt
On 3/26/15 2:06 PM, staceytian4...@gmail.com wrote:
 Hi all,
 
 I am using puppet 3.7.3.
 
 I want my puppet agent to run twice a day, so in puppet.conf, I set
 runinterval:
 
 #  This setting can be a time interval in seconds (30 or 30s), minutes
 (30m), hours (6h), days(2d), or years (5y)
  runinterval = 12h
 
 However, how could I setup the puppet agent run to happen at a specific
 time?
 For example, 2:00am and 2:00pm respectively?
 
 Now it seems random. And whenever the machine is rebooted, it will run
 puppet agent.
 
 Thanks,
 Zaiwen
 

Hi Zaiwen,

The easiest way to manage when and how your agent runs is through cron.
Highly recommend running in that fashion.

Best regards,
-g
-- 
Garrett Honeycutt
@learnpuppet
Puppet Training with LearnPuppet.com
Mobile: +1.206.414.8658

-- 
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/55141320.6020003%40garretthoneycutt.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] How to setup Puppet agent run interval at a specific time?

2015-03-26 Thread staceytian4321
Thanks a lot for the reply. I will implement a cron job for that.

On Thursday, March 26, 2015 at 10:09:43 AM UTC-4, Garrett Honeycutt wrote:

 On 3/26/15 2:06 PM, staceyt...@gmail.com javascript: wrote: 
  Hi all, 
  
  I am using puppet 3.7.3. 
  
  I want my puppet agent to run twice a day, so in puppet.conf, I set 
  runinterval: 
  
  #  This setting can be a time interval in seconds (30 or 30s), minutes 
  (30m), hours (6h), days(2d), or years (5y) 
   runinterval = 12h 
  
  However, how could I setup the puppet agent run to happen at a specific 
  time? 
  For example, 2:00am and 2:00pm respectively? 
  
  Now it seems random. And whenever the machine is rebooted, it will run 
  puppet agent. 
  
  Thanks, 
  Zaiwen 
  

 Hi Zaiwen, 

 The easiest way to manage when and how your agent runs is through cron. 
 Highly recommend running in that fashion. 

 Best regards, 
 -g 
 -- 
 Garrett Honeycutt 
 @learnpuppet 
 Puppet Training with LearnPuppet.com 
 Mobile: +1.206.414.8658 


-- 
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/5c94cd31-6798-4dab-9683-704ec06c7930%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.