Re: [Puppet Users] scheduling refresh event BEFORE dependent object

2014-07-24 Thread Pete Brown
If you are actually managing apt and need to trigger an apt-update before a package install I can highly recommend the puppetlabs/apt module on puppet forge I am using it in my environments and it does a very good job at managing all of apt and friends. https://forge.puppetlabs.com/puppetlabs/apt

Re: [Puppet Users] Re: How to group systems using Puppet and hiera?

2014-07-24 Thread Atom Powers
The ENC can pass on any variable you wish to define and they can be used by Hiera. I haven't got around to implementing a true CMDB yet so I use a very simple ruby script as my ENC. It reads the hieradata/nodes/fqdn.yaml file for a "role" value and returns that in the output to puppet. My hiera.yam

Re: [Puppet Users] Re: How to group systems using Puppet and hiera?

2014-07-24 Thread Grant Street
Hey Thanks for the reply I want the ENC to pass on variables or the like so that these can be used by hiera to apply roles/profiles etc. eg ENC returns a nodes software role eg role: desktop_software Then hiera can load the desktop_software.yaml file to apply that software role as part of i

Re: [Puppet Users] not able to comment line using file_line resource

2014-07-24 Thread Joachim Schrod
On 07/24/14 17:17, Supriya Uppalapati wrote: > > I did like this using file_line resource > file_line { 'replace a line to /home/infauser/.bash_profile': > path => '/home/infauser/.bash_profile', > line => 'export INFA_CODEPAGENAME=UTF-8', > #match => '^# export INFA_CODEPAGENAM

[Puppet Users] using a template, how do you create multiple files whose names come from an array?

2014-07-24 Thread senorsmile
For example, I have an array like this: clusters => [ 'cluster1', 'cluster2', 'cluster3', 'cluster4', ] I then have a cluster.init.erb that looks soemthing like this: start on runlevel [2345] stop on runlevel [!2345] expect fork respawn <% @clusters.each do | cluster | -%> env PIDF

[Puppet Users] Re: How to use variables in a puppet class

2014-07-24 Thread Vikas Kumar
Hi CD, Just tried these too, but somehow puppet is not honoring any variables in the resources. baseurl => http://192.168.1.100/centos/$releasever/os/$basearch, and baseurl => "http://192.168.1.100/centos/$releasever/os/$basearch";, Somehow, notify is working fine. notify {'FYI': mess

[Puppet Users] Re: How to use variables in a puppet class

2014-07-24 Thread CD
Hi Vikas, This is not the solution to your question but possibly alternative option. It seems you want to generate a yum repo url for specific OS version so that it picks-up correct version arch etc. How about if you use following and set up repos to match. baseurl=http:///centos/$releasever/o

[Puppet Users] Re: puppet time stamp check

2014-07-24 Thread Lunixer
Adding this for informational purposes. This problem was related to the one I posted in another thread. The fix is below. Blank the file. # cp /dev/null /var/lib/puppet/state/state.yaml Run the agent. # /opt/puppet/bin/puppet agent --test notice: /Stage[main]/Solaris/File[/etc/logadm.conf]/ensu

Re: [Puppet Users] Re: puppet md5 checksum changed

2014-07-24 Thread Lunixer
Thanks for the pointer. I believe this does it. No need to stop the puppet agent. Just two things: - blank the /var/lib/puppet/state/state.yaml file - run the puppet agent New values are recorded. Blank the file. # cp /dev/null state.yaml Run the agent. # /opt/puppet/bin/puppet agent --test n

[Puppet Users] Deploying HA cluster with pacemaker using Puppet

2014-07-24 Thread CD
Dear friends, I wonder whether anyone have any experience deploying a Linux HA cluster using Puppet. I would like to automate the deployment of HA cluster (http://clusterlabs.org/doc/en-US/Pacemaker/1.1-pcs/html/Clusters_from_Scratch/index.html) in a Puppet master-agent model. These are the c

[Puppet Users] Re: How to use variables in a puppet class

2014-07-24 Thread Vikas Kumar
Hi Sean/Juan, Yes, the redhat-lsb package is installed on my RedHat 6.4 machine which is my Puppet Client server. Puppet server is Ubuntu 14.04. root@box27:~# rpm -qa | grep redhat-lsb redhat-lsb-graphics-4.0-7.el6.x86_64 redhat-lsb-compat-4.0-7.el6.x86_64 redhat-lsb-core-4.0-7.el6.x86_64 redhat

Re: [Puppet Users] Hiera - how to include all files inside a directory

2014-07-24 Thread John Warburton
I presume you just want the information for the one customer, and not all customers? If the first, I assume you set the customer name, and you just dump the information in a file named after the customer. If you want all customers, dump it all in one common file. Whilst, we're still using extlook

Re: [Puppet Users] Hiera - how to include all files inside a directory

2014-07-24 Thread Pete Brown
I don't believe that is possible. You will probably need to collate all the files in customers/ into one file. I am going to hazard a guess that you have data relating to your customers in that directory. If the data in those files is specific to each customer and each of your nodes had only one c

Re: [Puppet Users] Error 400/403 on Windows with mcollective+puppet in large amount of servers deployment

2014-07-24 Thread Pete Brown
On 24 Jul 2014 21:50, "Peiven Cheng" wrote: > > Hi all, > > We use mcollective to trigger puppet sync in windows servers. > While we send the 'mco puppet runonce' to trigger 8~10 servers doing puppet > agent apply, > it occasionally happened the error of > Could not retrieve catalog from remote s

Re: [Puppet Users] Auditing users (AD+local) and groups

2014-07-24 Thread Josh Cooper
On Thu, Jul 24, 2014 at 1:22 PM, huhm4n wrote: > Thanks a lot for the idea. I'll be creating a facter and see how it works > or what i can do with it > > > On Thursday, July 24, 2014 8:25:21 AM UTC-7, showy wrote: > >> Hi, for this problem you would be better off with other tools. >> >> Neverthe

Re: [Puppet Users] Auditing users (AD+local) and groups

2014-07-24 Thread huhm4n
Thanks a lot for the idea. I'll be creating a facter and see how it works or what i can do with it On Thursday, July 24, 2014 8:25:21 AM UTC-7, showy wrote: > > Hi, for this problem you would be better off with other tools. > > Nevertheless you could create a facter thar list all the users in th

[Puppet Users] Exported resouces, ceph

2014-07-24 Thread M. Piscaer
Hi, I have two ceph clusters 'ceph_prod_cluster' and 'OSC_acc_storage' For the OSC_acc_storage cluster I have 3 ceph monitor nodes isp-oscaccstormon-01, isp-oscaccstormon-02 and isp-oscaccstormon-03. I deploy the nodes with puppet-ceph. Like you can see on https://github.com/mpiscaer/puppet-ceph

Re: [Puppet Users] Re: puppet md5 checksum changed

2014-07-24 Thread Christopher Wood
I was vaguely nosy, and found a note that the checksum is stored in state.yaml. Maybe stop puppet, nuke the state file, and start puppet? http://puppetlabs.com/blog/all-about-auditing-with-puppet /var/lib/puppet/state/state.yaml NB: Untested advice, potentially dangerous, use at your own risk.

[Puppet Users] Re: puppet md5 checksum changed

2014-07-24 Thread Lunixer
Does anyone have a tip regarding this? How do I stop it? I know that the "audit=>all" is causing this. It recorded the MD5 sum of the file when the audit ran for the first time. But a newer file was created as a result of patching the client machine. Is there a command I could rerun on the client

[Puppet Users] Re: How to use variables in a puppet class

2014-07-24 Thread Juan Moreno
Hi, You can try to execute facter in the nodes, with this you can see the facter availables. It's posibble that *lsbdistrelease *is not available, but *operatingsystemrelease* works properly. This is because *lsbdistrelease *uses a package and *operatingsystemrelease* read from a file /etc/re

[Puppet Users] scheduling refresh event BEFORE dependent object

2014-07-24 Thread Dimitris Stafylarakis
Hi all, I have a question for the experts in the group: say there's an exec resource dependent on some other resource and refreshonly=> true. As we know already, a change in the dependent resource will send a refresh event to the exec resource. This will however be scheduled for AFTER the chan

Re: [Puppet Users] Re: How to group systems using Puppet and hiera?

2014-07-24 Thread Atom Powers
Grant, You probably want to use an ENC, which will allow you to define any fact from a specified datasource. In a simple implementation I use an ENC to read the node's hiera file and output a few facts, such as a node's role/group, which are then used by hiera to define additional information for

Re: [Puppet Users] Auditing users (AD+local) and groups

2014-07-24 Thread Eduardo A Muñoz
Hi, for this problem you would be better off with other tools. Nevertheless you could create a facter thar list all the users in the system and use that information in a class to check and save against a centralized db. On Jul 23, 2014 4:35 PM, "huhm4n" wrote: > I'm trying to audit local users

[Puppet Users] not able to comment line using file_line resource

2014-07-24 Thread Supriya Uppalapati
Hi, I did like this using file_line resource *file_line { 'replace a line to /home/infauser/.bash_profile': path => '/home/infauser/.bash_profile', line => 'export INFA_CODEPAGENAME=UTF-8', #match => '^# export INFA_CODEPAGENAME=UTF-8.*',* *But it is giving me an error:*

Re: [Puppet Users] Getting Variables out of define in site.pp

2014-07-24 Thread Henrik Lindberg
On 2014-24-07 14:27, Werner Flamme wrote: em...@benjaminmertens.de [24.07.2014 12:42]: # site.pp define iterateSystemRole { case $name { 'app1': { include app1 $defineVariable = 'content' }

[Puppet Users] Re: Banned from RHN due to exessive connections; would like opions on my solution.

2014-07-24 Thread jcbollinger
On Wednesday, July 23, 2014 6:26:00 PM UTC-5, Stack Kororā wrote: > > Greetings! > > Thank you so much John. I just learned something new about Puppet. Utilizing > inline_template is a heck of a lot easier then how I first attempted that > variable substitution. I might have to go back and fix

Re: [Puppet Users] puppetlabs-mysql

2014-07-24 Thread David Kindle
Thanks Hunter - this is the info I was looking for. Now of course I need puppet to create this file for me since the idea here is that I dont have to touch the node. Can you be more specific on he "just add your own info" Is the the client/socket/unset info? can you populate those with d

[Puppet Users] Hiera - how to include all files inside a directory

2014-07-24 Thread Juan Moreno
Hi, I would like to know if exists the possibility to include all the yaml files of a directory in hiera. The hiera config looks like: :hierarchy: - %{hostname} - secrets - customers/* :backends: - yaml :yaml: :datadir: '/etc/puppet/data' Cheers, Juan Moreno -- You received this m

Re: [Puppet Users] Getting Variables out of define in site.pp

2014-07-24 Thread Werner Flamme
em...@benjaminmertens.de [24.07.2014 12:42]: > > # site.pp > > define iterateSystemRole { > case $name { > 'app1': { > include app1 > $defineVariable = 'content' > } > 'app2': { >

Re: [Puppet Users] How to use variables in a puppet class

2014-07-24 Thread Sean Crosby
Hi Vikas, Do you have the package 'redhat-lsb' installed? The $lsbdistrelease fact is only populated when this package is installed Sean On 24 July 2014 17:07, Vikas Kumar wrote: > Hello All, > > I have a kickstart server which I use to deploy many minor versions of > CentOS/RHEL 5 and 6 for

[Puppet Users] How to use variables in a puppet class

2014-07-24 Thread Vikas Kumar
Hello All, I have a kickstart server which I use to deploy many minor versions of CentOS/RHEL 5 and 6 for both 32 and 64 Bit OS. I have lots of yum repository files. For. e.g. - RHEL_5.5_64.repo, RHEL_5.6_64.repo, RHEL_6.2_32, RHEL_6.5_64, etc. I am looking to use Puppet to automatically deplo

[Puppet Users] Getting Variables out of define in site.pp

2014-07-24 Thread email
Hi, my servers have some kind of "role" like "app1" or "app1,app2" which im getting out of a selfmade global facter variable. Im then going through this list and include classes depending on the content of this variable. # site.pp define iterateSystemRole { case $name {

[Puppet Users] Error 400/403 on Windows with mcollective+puppet in large amount of servers deployment

2014-07-24 Thread Peiven Cheng
Hi all, We use mcollective to trigger puppet sync in windows servers. While we send the 'mco puppet runonce' to trigger 8~10 servers doing puppet agent apply, it occasionally happened the error of Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find class test_1_0_

[Puppet Users] Re: How to group systems using Puppet and hiera?

2014-07-24 Thread Grant Street
I am looking to implement puppet coming from cfe2 I am also finding it hard to make the connection between nodes and groups using hiera. I would like a solution where I can define host groups etc on the puppet master rather than relying on the client to have a file(s) put in particular location