Re: [Puppet Users] Re: puppetlabs-postgrest module not loaded

2015-09-04 Thread Alfredo De Luca
Hi David.
Here is the output.
[root@puppet-server puppet]# hiera -d postgresql::server
DEBUG: Fri Sep 04 20:18:29 +1000 2015: Hiera YAML backend starting
DEBUG: Fri Sep 04 20:18:29 +1000 2015: Looking up postgresql::server
in YAML backend
DEBUG: Fri Sep 04 20:18:29 +1000 2015: Looking for data source common
nil
[root@puppet-server puppet]# hiera -d postgresql::server
DEBUG: Fri Sep 04 20:19:04 +1000 2015: Hiera YAML backend starting
DEBUG: Fri Sep 04 20:19:04 +1000 2015: Looking up postgresql::server
in YAML backend
DEBUG: Fri Sep 04 20:19:04 +1000 2015: Looking for data source common
nil

[root@puppet-server puppet]#
[root@puppet-server puppet]# hiera -d sudo::configs fqdn=puppet-sql.alflab.net
DEBUG: Fri Sep 04 20:19:17 +1000 2015: Hiera YAML backend starting
DEBUG: Fri Sep 04 20:19:17 +1000 2015: Looking up sudo::configs in YAML backend
DEBUG: Fri Sep 04 20:19:17 +1000 2015: Looking for data source common
nil
[root@puppet-server puppet]# hiera -d -a postgresql::server
fqdn=puppet-sql.alflab.net
DEBUG: Fri Sep 04 20:19:23 +1000 2015: Hiera YAML backend starting
DEBUG: Fri Sep 04 20:19:23 +1000 2015: Looking up postgresql::server
in YAML backend
DEBUG: Fri Sep 04 20:19:23 +1000 2015: Looking for data source common
nil
[root@puppet-server puppet]# hiera -d -h postgresql::server
fqdn=puppet-sql.alflab.net
DEBUG: Fri Sep 04 20:19:31 +1000 2015: Hiera YAML backend starting
DEBUG: Fri Sep 04 20:19:31 +1000 2015: Looking up postgresql::server
in YAML backend
DEBUG: Fri Sep 04 20:19:31 +1000 2015: Looking for data source common
nil


On Fri, Sep 4, 2015 at 2:06 AM, David Levray  wrote:
> In  /etc/puppet/hieradata/nodes/ create a file 'puppet-sql.alflab.net.yaml'
> that contains:
>
> ---
> postgresql::server:
>
>
> restart your instance PuppetMaster (service httpd/apache2 restart)
> Then we test hiera debug mode if it finds the information:
>
> hiera -d postgresql::server
> hiera -d sudo::configs fqdn=puppet-sql.alflab.net
>
> or (for array)
> hiera -d -a postgresql::server fqdn=puppet-sql.alflab.net
>
> or (for hash):
> hiera -d -h postgresql::server fqdn=puppet-sql.alflab.net
>
>
> Can you give the return orders, please
>
>
>
>
>
>
> Le samedi 29 août 2015 06:31:29 UTC+2, Alfredo De Luca a écrit :
>>
>> Hi all.
>> Using Puppet open source  3.8  with hiera for test purpose.
>>
>> I installed puppetlabs-postgresql from forge but when on my puppet
>> client yaml I use postgresql I got the following error:
>>
>>
>> Error: Could not retrieve catalog from remote server: Error 400 on
>> SERVER: Could not find class postgresql for puppet-sql.alflab.net on
>> node puppet-sql.alflab.net
>>
>>
>> Any clue why?
>>
>> Here is the yaml file
>>
>> ---
>> classes:
>>   - sudo
>>   - selinux
>>   - postgresql
>>
>> All the rest is working just fine. Also I tried puppetlabs-mysql but
>> same error.
>>
>> Regards
>>
>> --
>> Alfredo
>
> --
> 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/6a741c4e-35ad-43c2-bb2d-3c48c7bc558c%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



-- 
Alfredo

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


[Puppet Users] Re: SSL Cert's are generated but not saved

2015-09-04 Thread David Levray
Hello,

look in /var/lib/puppet/ssl

Your directry SSL is setting in file puppet.conf.
exemple:

 vardir  = /var/lib/puppet
 ssldir  = $vardir/ssl

Look your puppet.conf

by




Le mercredi 2 septembre 2015 22:14:24 UTC+2, Michael Holt a écrit :
>
> Hi,
>
> I'm working on using puppet to manage a fleet of Mac's.  I have run the 
> puppet in the background while at the mac login window after 
> /etc/puppet/puppet.conf is configured.
>
> puppet.conf:
> [master]
> # These are needed when the puppetmaster is run by passenger
> # and can safely be removed if webrick is used.
> ssl_client_header = SSL_CLIENT_S_DN
> ssl_client_verify_header = SSL_CLIENT_VERIFY
> pluginsync=true
>
> [agent]
> ##This is managed by puppet
> server=puppetserverurl
> certname=c02n5heug3qj
> report=true
> pluginsync=true
> environment=macs
>
> Puppet Agent command:
> sudo /usr/bin/puppet agent --detailed-exitcodes --onetime --no-daemonize 
> --verbose --environment macs --waitforcert 20
>
> it is run by a LaunchDaemon.  It runs sucessfully once and my settings are 
> applied but the SSL certs are not saved in /etc/puppet/ssl
>
> I've been looking all over and can't find anyone with this issue.  Does 
> anyone have any pointers?
>

-- 
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/547f2d3e-f6ee-41ac-a37f-ed5c399ec260%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: puppetlabs-postgrest module not loaded

2015-09-04 Thread David Levray


Thanks for your return.

It is noted that hiera your search directly in the common.yaml, it is not 
your path hierarchy.

 

Here's an example search or hiera good in the order of hierarchy:

My hierarchy is:


:hierarchy:

  - "node/%{fqdn}"

  - "virtual/%{virtual}"

  - "osfamily/%{osfamily}"

  - common

 

 

# hiera -d -m toto.local sudo::configs

DEBUG: Fri Sep 04 11:36:29 + 2015: Hiera YAML backend starting

DEBUG: Fri Sep 04 11:36:29 + 2015: Looking up sudo::configs in YAML 
backend

DEBUG: Fri Sep 04 11:36:29 + 2015: Looking for data source *node*
/toto.local

DEBUG: Fri Sep 04 11:36:29 + 2015: Cannot find datafile 
*/etc/puppet/hieradb/node*/ toto.local .yaml, skipping

DEBUG: Fri Sep 04 11:36:29 + 2015: Looking for data source *virtual/*
vmware

DEBUG: Fri Sep 04 11:36:29 + 2015: Cannot find datafile 
*/etc/puppet/hieradb/virtual/*vmware.yaml, skipping

DEBUG: Fri Sep 04 11:36:29 + 2015: Looking for data source *osfamily*
/RedHat

DEBUG: Fri Sep 04 11:36:29 + 2015: Cannot find datafile 
*/etc/puppet/hieradb/osfamily*/RedHat.yaml, skipping

DEBUG: Fri Sep 04 11:36:29 + 2015: Looking for data source *common*

DEBUG: Fri Sep 04 11:36:29 + 2015: *Found sudo::configs in common*

{"toto"=>{"content"=>"toto ALL=(ALL) NOPASSWD: ALL"}}

 

 

 

So check the following:

1 / verifies that the file points /etc/hiera.yaml of your file 
 /etc/puppet/hiera.yaml:

ls -rtla /etc/hiera.yaml

 /etc/hiera.yaml -> /etc/puppet/hiera.yaml

 

2 / Check the owners:

Chown puppet: puppet /etc/puppet/hiera.yaml

Chown -R puppet: puppet / etc / puppet / hieradata /

 

Restart your instance Puppet Master for the changes to take effect.






Le vendredi 4 septembre 2015 12:21:15 UTC+2, Alfredo De Luca a écrit :
>
> Hi David. 
> Here is the output. 
> [root@puppet-server puppet]# hiera -d postgresql::server 
> DEBUG: Fri Sep 04 20:18:29 +1000 2015: Hiera YAML backend starting 
> DEBUG: Fri Sep 04 20:18:29 +1000 2015: Looking up postgresql::server 
> in YAML backend 
> DEBUG: Fri Sep 04 20:18:29 +1000 2015: Looking for data source common 
> nil 
> [root@puppet-server puppet]# hiera -d postgresql::server 
> DEBUG: Fri Sep 04 20:19:04 +1000 2015: Hiera YAML backend starting 
> DEBUG: Fri Sep 04 20:19:04 +1000 2015: Looking up postgresql::server 
> in YAML backend 
> DEBUG: Fri Sep 04 20:19:04 +1000 2015: Looking for data source common 
> nil 
>
> [root@puppet-server puppet]# 
> [root@puppet-server puppet]# hiera -d sudo::configs fqdn=
> puppet-sql.alflab.net 
> DEBUG: Fri Sep 04 20:19:17 +1000 2015: Hiera YAML backend starting 
> DEBUG: Fri Sep 04 20:19:17 +1000 2015: Looking up sudo::configs in YAML 
> backend 
> DEBUG: Fri Sep 04 20:19:17 +1000 2015: Looking for data source common 
> nil 
> [root@puppet-server puppet]# hiera -d -a postgresql::server 
> fqdn=puppet-sql.alflab.net 
> DEBUG: Fri Sep 04 20:19:23 +1000 2015: Hiera YAML backend starting 
> DEBUG: Fri Sep 04 20:19:23 +1000 2015: Looking up postgresql::server 
> in YAML backend 
> DEBUG: Fri Sep 04 20:19:23 +1000 2015: Looking for data source common 
> nil 
> [root@puppet-server puppet]# hiera -d -h postgresql::server 
> fqdn=puppet-sql.alflab.net 
> DEBUG: Fri Sep 04 20:19:31 +1000 2015: Hiera YAML backend starting 
> DEBUG: Fri Sep 04 20:19:31 +1000 2015: Looking up postgresql::server 
> in YAML backend 
> DEBUG: Fri Sep 04 20:19:31 +1000 2015: Looking for data source common 
> nil 
>
>
> On Fri, Sep 4, 2015 at 2:06 AM, David Levray  > wrote: 
> > In  /etc/puppet/hieradata/nodes/ create a file 
> 'puppet-sql.alflab.net.yaml' 
> > that contains: 
> > 
> > --- 
> > postgresql::server: 
> > 
> > 
> > restart your instance PuppetMaster (service httpd/apache2 restart) 
> > Then we test hiera debug mode if it finds the information: 
> > 
> > hiera -d postgresql::server 
> > hiera -d sudo::configs fqdn=puppet-sql.alflab.net 
> > 
> > or (for array) 
> > hiera -d -a postgresql::server fqdn=puppet-sql.alflab.net 
> > 
> > or (for hash): 
> > hiera -d -h postgresql::server fqdn=puppet-sql.alflab.net 
> > 
> > 
> > Can you give the return orders, please 
> > 
> > 
> > 
> > 
> > 
> > 
> > Le samedi 29 août 2015 06:31:29 UTC+2, Alfredo De Luca a écrit : 
> >> 
> >> Hi all. 
> >> Using Puppet open source  3.8  with hiera for test purpose. 
> >> 
> >> I installed puppetlabs-postgresql from forge but when on my puppet 
> >> client yaml I use postgresql I got the following error: 
> >> 
> >> 
> >> Error: Could not retrieve catalog from remote server: Error 400 on 
> >> SERVER: Could not find class postgresql for puppet-sql.alflab.net on 
> >> node puppet-sql.alflab.net 
> >> 
> >> 
> >> Any clue why? 
> >> 
> >> Here is the yaml file 
> >> 
> >> --- 
> >> classes: 
> >>   - sudo 
> >>   - selinux 
> >>   - postgresql 
> >> 
> >> All the rest is working just fine. Also I tried puppetlabs-mysql but 
> >> same error. 
> >> 
> >> Regards 
> >> 
> >> -- 
> >> Alfredo 
> > 
> > -- 
> > You received this message 

Re: [Puppet Users] Managing Chocolatey sources with File resource and Template on Windows 7 x64 SP1

2015-09-04 Thread jmp242
64 bit.

-- 
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/05bd8bec-247e-44a0-870b-2936a038c41c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Display the contents of a yaml file

2015-09-04 Thread jcbollinger


On Friday, September 4, 2015 at 3:35:04 AM UTC-5, Sergiu Cornea wrote:
>
> Thank you John,
>
> Thank you for your answer and sorry for the ambiguity.
>
> The YAML file I am referring to is the node's YAML file such as in the 
> Puppet's NTP complete example:
>
>

What you are looking at is external data in YAML format, such as would be 
*consumed* by Hiera.  It is an input, not an output, and in general it is 
not monolithic -- the data for a given node is often spread across multiple 
files.  Moreover, the data, based on those files, that Hiera feeds to 
Puppet are context-sensitive in general: Hiera can interpolate contextual 
values based on Puppet variables into the data and feed the result back to 
Puppet, or it can even use such contextual data to select from which files 
to draw input in the first place.
 
Bottom line: it's still unclear what you want -- Hiera input or Hiera 
output -- and if the latter, it doesn't exist in any objective, 
context-insensitive sense.


John

-- 
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/0236686e-138c-439a-9016-d3893ac581d1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: MCollective Plugins - Can I Install with Puppet Collections?

2015-09-04 Thread Stefan Heijmans
There are some jira tickets on this;
https://tickets.puppetlabs.com/browse/MCOP-516
https://tickets.puppetlabs.com/browse/MCOP-529
 

-- 
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/753e6e82-075a-4322-ad6f-12de581e699a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] when I try to update /etc/sudoers in puppet master the files it doesnt get updated! please help!

2015-09-04 Thread bobby38
Hello All,

i have created a module called Sudoers here is the content of the init.pp


File { owner => "root", group => "root", mode  => "0440" }

file {"/etc/sudoers":
ensure => "present",
content => template("sudoers/sudoers.erb"),
}

file {  "/etc/sudoers.d":
ensure  => "directory",
owner   => "root",
group   => "root",
recurse => "false",
mode=> 550,
}


and this is the content of sudoers.erb

rootALL=(ALL)   NOPASSWD: ALL


# Admins
user1  ALL=(ALL)   NOPASSWD: ALL
user2  ALL=(ALL)   NOPASSWD: ALL


now when i do puppet agent --test 

i am getting 


*Info: Retrieving pluginfacts*
*Info: Retrieving plugin*
*Info: Caching catalog for ip-10-167-26-44.*
*Info: Applying configuration version '1441378237'*
*Notice: Finished catalog run in 0.03 seconds*


*but when i look to content of /etc/sudeors nothing get uppdated. *
*basically all my sudeors class is ignored*
*can you guys tell me what I am doing wrong?*

*Thanks a lot! *

-- 
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/19f1f9de-dfcd-4c02-88ec-d08b6f5ee951%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Is there a method for puppet to find all suid files?

2015-09-04 Thread Sean
Hi,
 
I'm using a module from the Forge to manage auditd rules, the module works 
quite well and managing rules is very easy.  The hard part is that there's 
a requirement to audit use SUID files on each system.  With out knowing 
exactly what files are SUID on every server in the field, since there are 
several linux flavors and versions, I'm finding myself thinking the only 
way to accomplish this is to write a custom fact to hold all the SUID files 
as an array, then pass the array to the resource creator.  I just don't 
relish the idea of running a find command from / every 30 minutes.

Might anyone have any better ideas?

Thank you kindly!

-- 
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/e848e8ab-0a96-4934-9382-42f3b828d529%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Display the contents of a yaml file

2015-09-04 Thread Sergiu Cornea
Thank you John,

Thank you for your answer and sorry for the ambiguity.

The YAML file I am referring to is the node's YAML file such as in the 
Puppet's NTP complete example:

--- classes: - ntp - apache - postfix ntp::restrict: - ntp::autoupdate: 
false ntp::enable: true ntp::servers: - 0.us.pool.ntp.org iburst - 
1.us.pool.ntp.org iburst - 2.us.pool.ntp.org iburst - 3.us.pool.ntp.org 
iburst

What I was looking for it was a way of displaying the node's YAML file 
using Puppet or Foreman's Web API.

Once again thank you for your help.

Kind regards,
Sergiu

On Thursday, 3 September 2015 09:10:42 UTC+1, Sergiu Cornea wrote:
>
> Good morning guys,
>
> I am not sure if I am asking the right question, however, I am looking for 
> a Puppet / Foreman Web API that when called with a node name it will 
> display the contents of that YAML file? The reason why I am asking is that 
> I want a particular node YAML file to be displayed in a WebUI.
>
> Does anyone knows how to do this? 
>
> 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.

-- 
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/0471c65d-103b-4304-beca-9f282cd9a1d5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Display the contents of a yaml file

2015-09-04 Thread David Levray
Hi,

Look: 

hiera-file:  designed by Adrien Thebo to manage a data type that previously 
could not be stored in a healthy way in Hiera, that is, simple files.

or 

hiera-http and hiera-mysql: are other powerful backends Hiera written by 
Craig Dunn. They allow us to recover our data either via a REST interface 
or MySQL queries on a database.




Le vendredi 4 septembre 2015 10:35:04 UTC+2, Sergiu Cornea a écrit :
>
> Thank you John,
>
> Thank you for your answer and sorry for the ambiguity.
>
> The YAML file I am referring to is the node's YAML file such as in the 
> Puppet's NTP complete example:
>
> --- classes: - ntp - apache - postfix ntp::restrict: - ntp::autoupdate: 
> false ntp::enable: true ntp::servers: - 0.us.pool.ntp.org iburst - 
> 1.us.pool.ntp.org iburst - 2.us.pool.ntp.org iburst - 3.us.pool.ntp.org 
> iburst
>
> What I was looking for it was a way of displaying the node's YAML file 
> using Puppet or Foreman's Web API.
>
> Once again thank you for your help.
>
> Kind regards,
> Sergiu
>
> On Thursday, 3 September 2015 09:10:42 UTC+1, Sergiu Cornea wrote:
>>
>> Good morning guys,
>>
>> I am not sure if I am asking the right question, however, I am looking 
>> for a Puppet / Foreman Web API that when called with a node name it will 
>> display the contents of that YAML file? The reason why I am asking is that 
>> I want a particular node YAML file to be displayed in a WebUI.
>>
>> Does anyone knows how to do this? 
>>
>> Thank you,
>>
>> Regards,
>> Sergiu
>>
>

-- 
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/7700e5c1-96f1-4093-915e-bd64783da439%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.