Re: [Puppet Users] hiera could not find item

2014-03-21 Thread José Luis Ledesma
The hiera command doesn't use facter, its a tool to check the values
returned by hiera in different circumstances.
El 21/03/2014 21:19, "Renan Vicente"  escribió:

> Any one had this problem to find a attribute or know how to solve this? In
> my case I separated hiera files by osfamily when I execute
>
>  # hiera packages_utils
>
> return me
>
> nil
>
> BUT if I execute
>
> # hiera packages_utils osfamily=Debian
>
> it's works
>
> ["tzdata",
>  "dnsutils",
>  "bash-completion",
>  "unzip",
>  "bzip2",
>  "htop",
>  "vim",
>  "ntpdate",
>  "mlocate",
>  "nfs-common",
>  "sysstat"]
>
> the facter osfamily works.
>
> # facter osfamily
> Debian
>
> my hiera.yaml
>
> ---
> :backends:
>   - yaml
> :hierarchy:
>   - "nodes/%{fqdn}"
>   - "osfamily/%{osfamily}"
>   - "osfamily/%{operatingsystem}"
>   - defaults/users
>   - defaults/hosts
>   - "%{clientcert}"
>   - "%{environment}"
>   - global
>
> :yaml:
> # datadir is empty here, so hiera uses its defaults:
> # - /var/lib/hiera on *nix
> # - %CommonAppData%\PuppetLabs\hiera\var on Windows
> # When specifying a datadir, make sure the directory exists.
>   :datadir: /etc/puppet/hiera
>
> my osfamily directory content
>
> # ls -l /etc/puppet/hiera/osfamily/
> total 12
> lrwxrwxrwx 1 root root  11 Mar 21 15:44 CentOS.yaml -> RedHat.yaml
> -rw-r--r-- 1 root root 248 Mar 21 16:11 Debian.yaml
> -rw-r--r-- 1 root root  29 Mar 21 16:13 default.yaml
> -rw-r--r-- 1 root root 223 Mar 21 15:44 RedHat.yaml
> lrwxrwxrwx 1 root root  11 Mar 21 15:44 Ubuntu.yaml -> Debian.yaml
>
> my Debian.yaml
>
> ---
> packages_utils:
>   - tzdata
>   - dnsutils
>   - bash-completion
>   - unzip
>   - bzip2
>   - htop
>   - vim
>   - ntpdate
>   - mlocate
>   - nfs-common
>   - sysstat
> conf_ntp:
>   - ntpdate
> conf_ntp_path:
>   - /etc/default/ntpdate
> conf_vim_path:
>   - /etc/vim/vimrc
>
>  --
> 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/11625c93-4c89-4fd6-8c82-6b9c170ebddb%40googlegroups.com
> .
> 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/CAF_B3dejCjxStg3-4jMJfPL%2BtmFsGTVrYj0EkL%3DqRz01PbyFYg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] hiera could not find item

2014-03-21 Thread Renan Vicente


Any one had this problem to find a attribute or know how to solve this? In 
my case I separated hiera files by osfamily when I execute

 # hiera packages_utils

return me

nil

BUT if I execute

# hiera packages_utils osfamily=Debian

it's works

["tzdata",
 "dnsutils",
 "bash-completion",
 "unzip",
 "bzip2",
 "htop",
 "vim",
 "ntpdate",
 "mlocate",
 "nfs-common",
 "sysstat"]

the facter osfamily works.

# facter osfamily
Debian

my hiera.yaml

---
:backends:
  - yaml
:hierarchy:
  - "nodes/%{fqdn}"
  - "osfamily/%{osfamily}"
  - "osfamily/%{operatingsystem}"
  - defaults/users
  - defaults/hosts
  - "%{clientcert}"
  - "%{environment}"
  - global

:yaml:
# datadir is empty here, so hiera uses its defaults:
# - /var/lib/hiera on *nix
# - %CommonAppData%\PuppetLabs\hiera\var on Windows
# When specifying a datadir, make sure the directory exists.
  :datadir: /etc/puppet/hiera

my osfamily directory content

# ls -l /etc/puppet/hiera/osfamily/
total 12
lrwxrwxrwx 1 root root  11 Mar 21 15:44 CentOS.yaml -> RedHat.yaml
-rw-r--r-- 1 root root 248 Mar 21 16:11 Debian.yaml
-rw-r--r-- 1 root root  29 Mar 21 16:13 default.yaml
-rw-r--r-- 1 root root 223 Mar 21 15:44 RedHat.yaml
lrwxrwxrwx 1 root root  11 Mar 21 15:44 Ubuntu.yaml -> Debian.yaml

my Debian.yaml

---
packages_utils:
  - tzdata
  - dnsutils
  - bash-completion
  - unzip
  - bzip2
  - htop
  - vim
  - ntpdate
  - mlocate
  - nfs-common
  - sysstat
conf_ntp:
  - ntpdate
conf_ntp_path:
  - /etc/default/ntpdate
conf_vim_path:
  - /etc/vim/vimrc

-- 
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/11625c93-4c89-4fd6-8c82-6b9c170ebddb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: mount point directory permissions

2014-03-21 Thread José Luis Ledesma
I prefer the exec resource to create the mount point ( with onlyif ! Test-d
mountpoint) and the file resource to set the proper permissions.

Regards,
El 21/03/2014 18:48, "Peter Bukowinski"  escribió:

> It may not be the nicest way to handle it, but it's not all that
> cumbersome. If your mount command is modifying the permissions, than you
> can tell it to notify an exec resource that fixes the perms.
>
> file { '/app_dir':
>   ensure  => 'directory'
>   owner   => 'app_user'
>   group   => 'app_group'
>   mode   => '2775'
> } mount { '/app_dir':
>   ensure => mounted,
>   atboot => true,
>   device => /dev/mapper/lv_app,
>   fstype => ext3,
>   options => 'defaults',
>   dump => '1',
>   pass => '2',
>   require => File['/app_dir'],
>   notify => Exec['fix_mount_perms'],
> }
> exec { 'fix_mount_perms':
>   command => 'chmod 2755 /app_dir && chown root:root /app_dir',
>   refreshonly => true,
> }
>
> Setting the exec's refreshonly parameter to true prevents it from running
> every time, but it will run any time the mount resource changes.
>
> --
> Peter Bukowinski
>
> On Mar 21, 2014, at 1:42 PM, Paolo Supino  wrote:
>
> Hi Guto
> Too cumbersome: Have to setup a check for ownership, groupship and
> permissions... :-(
>
>
> On Fri, Mar 21, 2014 at 6:28 PM, guto carvalho wrote:
>
>> Try to use paramters like unless, refreshonly or onlyinf to trigger the
>> command in specific conditions, not every time, inside your exec.
>>
>> http://docs.puppetlabs.com/references/latest/type.html#exec-attributes
>>
>> http://docs.puppetlabs.com/references/latest/type.html#exec-attribute-refreshonly
>>
>> http://docs.puppetlabs.com/references/latest/type.html#exec-attribute-unless
>>
>> http://docs.puppetlabs.com/references/latest/type.html#exec-attribute-onlyif
>>
>>
>> On Fri, Mar 21, 2014 at 2:19 PM, Paolo Supino wrote:
>>
>>> Hi Renan
>>>
>>> between the solutions I tried was something like this, only that the
>>> exec fix permissions got executed on every run of puppet...
>>>
>>>
>>> On Fri, Mar 21, 2014 at 5:53 PM, Renan Vicente wrote:
>>>
 you can use notify for a Exec and use a exec { 'fix permission':

  command => 'chmod 0755 /app_dir ; chown root:root /app_dir'
}
 something like that, I didn't test but I guess that you work :D


 On Friday, March 21, 2014 1:41:25 PM UTC-3, Paolo wrote:
>
> Hi
>
> I have the following problem: in a certain module I need to set
> permissions on a directory after the mount was executed. If I do the
> following
>
> file { '/app_dir':
>   ensure  => 'directory'
>   owner   => 'app_user'
>   group   => 'app_group'
>   mode   => '2775'
> } mount { '/app_dir':
>   ensure => mounted,
>   atboot => true,
>   device => /dev/mapper/lv_app,
>   fstype => ext3,
>   options => 'defaults',
>   dump => '1',
>   pass => '2',
>   require => File['/app_dir'],
> }
>
> This would require 2 rounds of puppet: round 1 to setup directory,
> mount the filesystem and round 2 to fix permissions set to root:root,0755
> by the mount command...
>
> In looking for a solution I found the following link:
> https://projects.puppetlabs.com/issues/4815 that asks for the option
> to add permission settings to mount resource. The request was rejected and
> in the comments
>  Eric Sorenson writes that it would be trivial to accomplish with a
> defined type, but without going into details... :-( Can any one give me
> some details on how to do it with a defined type?
>
>
>
> TIA
> Paolo
>
>
>
 --
 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/bc2954ad-6c52-4772-8f67-a22d98d81c56%40googlegroups.com
 .
 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/CA%2BB25BzXeMtPFpbAK3f5MwjfXSGoZJC1%2BfzsQvyVbTZRjVjCbA%40mail.gmail.com
>>> .
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> 

Re: [Puppet Users] Re: Change to issue tracking for Forge & PL Module projects

2014-03-21 Thread Ryan Coleman
On Fri, Mar 21, 2014 at 11:23 AM, Dawn Foster  wrote:

> On Fri, Mar 21, 2014 at 11:16 AM, Heidi Pio 
> wrote:
> > The pull request process will not change, however, the Puppet Forge
> > Community Pull Request Review meeting has moved to Thursdays at 10am PST
> .
> > Ashley Penney has graciously offered to send out weekly updates for those
> > meetings via the Puppet-Dev list.
>
> I suspect that this meeting is on Thursdays at 10am PDT, since PST
> ended a couple of weeks ago?


Yes. This thread has more on the triage and its date/time:
https://groups.google.com/d/msg/puppet-dev/hsYf58pEG_E/KBEJ6UdQUGUJ


-- 
Ryan Coleman | Modules & Forge | ryanycoleman on twitter & #puppet IRC

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


Re: [Puppet Users] Re: Change to issue tracking for Forge & PL Module projects

2014-03-21 Thread Dawn Foster
On Fri, Mar 21, 2014 at 11:16 AM, Heidi Pio  wrote:
> The pull request process will not change, however, the Puppet Forge
> Community Pull Request Review meeting has moved to Thursdays at 10am PST.
> Ashley Penney has graciously offered to send out weekly updates for those
> meetings via the Puppet-Dev list.

I suspect that this meeting is on Thursdays at 10am PDT, since PST
ended a couple of weeks ago?

Thanks,
Dawn Foster
Director of Community
http://puppetlabs.com/community

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


[Puppet Users] Error: Could not send report: Error 400 on SERVER: Could not intern from pson: undefined method `intern' for nil:NilClass

2014-03-21 Thread Race Boyer
This is driving me mad.
I get this error on two OpenSuse 12.3 nodes
puppet-3.0.2-2.9.1.x86_64
facter-1.6.17-2.1.1.x86_64

I ran this command:
*sudo puppet agent -t --verbose --noop --debug --trace *

*and I get this ouput:*
Info: Retrieving plugin
Debug: file_metadata supports formats: b64_zlib_yaml pson raw yaml; using 
pson
Debug: Finishing transaction 19305160
Info: Loading facts in /var/lib/puppet/lib/facter/ip6tables_version.rb
Info: Loading facts in 
/var/lib/puppet/lib/facter/iptables_persistent_version.rb
Info: Loading facts in /var/lib/puppet/lib/facter/iptables_version.rb
Info: Loading facts in /var/lib/puppet/lib/facter/facter_dot_d.rb
Info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb
Info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb
Info: Loading facts in /var/lib/puppet/lib/facter/pe_version.rb
Debug: catalog supports formats: b64_zlib_yaml dot pson raw yaml; using pson
Info: Caching catalog for svteustst02.hco.hc.hctx.net
Debug: Creating default schedules
Debug: Loaded state in 0.00 seconds
Info: Applying configuration version '1395341101'
Debug: /Schedule[daily]: Skipping device resources because running on a host
Debug: /Schedule[monthly]: Skipping device resources because running on a 
host
Debug: /Schedule[hourly]: Skipping device resources because running on a 
host
Debug: /Schedule[never]: Skipping device resources because running on a host
Debug: /Schedule[weekly]: Skipping device resources because running on a 
host
Debug: /Schedule[puppet]: Skipping device resources because running on a 
host
Debug: Finishing transaction 18621940
Debug: Storing state
Debug: Stored state in 0.02 seconds
Notice: Finished catalog run in 0.09 seconds
Debug: report supports formats: b64_zlib_yaml pson raw yaml; using pson
Debug: report supports formats: b64_zlib_yaml pson raw yaml; using pson
Debug: report supports formats: b64_zlib_yaml pson raw yaml; using pson
*Error: Could not send report: Error 400 on SERVER: Could not intern from 
pson: undefined method `intern' for nil:NilClass*
/usr/lib64/ruby/vendor_ruby/1.9.1/puppet/indirector/rest.rb:177:in 
`is_http_200?'
/usr/lib64/ruby/vendor_ruby/1.9.1/puppet/indirector/rest.rb:145:in `save'
/usr/lib64/ruby/vendor_ruby/1.9.1/puppet/indirector/indirection.rb:266:in 
`save'
/usr/lib64/ruby/vendor_ruby/1.9.1/puppet/configurer.rb:200:in `send_report'
/usr/lib64/ruby/vendor_ruby/1.9.1/puppet/configurer.rb:194:in `run'
/usr/lib64/ruby/vendor_ruby/1.9.1/puppet/agent.rb:45:in `block (5 levels) 
in run'
/usr/lib64/ruby/vendor_ruby/1.9.1/puppet/agent/locker.rb:20:in `lock'
/usr/lib64/ruby/vendor_ruby/1.9.1/puppet/agent.rb:45:in `block (4 levels) 
in run'
/usr/lib64/ruby/1.9.1/sync.rb:227:in `sync_synchronize'
/usr/lib64/ruby/vendor_ruby/1.9.1/puppet/agent.rb:45:in `block (3 levels) 
in run'
/usr/lib64/ruby/vendor_ruby/1.9.1/puppet/agent.rb:119:in `with_client'
/usr/lib64/ruby/vendor_ruby/1.9.1/puppet/agent.rb:42:in `block (2 levels) 
in run'
/usr/lib64/ruby/vendor_ruby/1.9.1/puppet/agent.rb:84:in `run_in_fork'
/usr/lib64/ruby/vendor_ruby/1.9.1/puppet/agent.rb:41:in `block in run'
/usr/lib64/ruby/vendor_ruby/1.9.1/puppet/application.rb:175:in `call'
/usr/lib64/ruby/vendor_ruby/1.9.1/puppet/application.rb:175:in 
`controlled_run'
/usr/lib64/ruby/vendor_ruby/1.9.1/puppet/agent.rb:39:in `run'
/usr/lib64/ruby/vendor_ruby/1.9.1/puppet/application/agent.rb:338:in 
`onetime'
/usr/lib64/ruby/vendor_ruby/1.9.1/puppet/application/agent.rb:312:in 
`run_command'
/usr/lib64/ruby/vendor_ruby/1.9.1/puppet/application.rb:346:in `block (2 
levels) in run'
/usr/lib64/ruby/vendor_ruby/1.9.1/puppet/application.rb:438:in `plugin_hook'
/usr/lib64/ruby/vendor_ruby/1.9.1/puppet/application.rb:346:in `block in 
run'
/usr/lib64/ruby/vendor_ruby/1.9.1/puppet/util.rb:496:in `exit_on_fail'
/usr/lib64/ruby/vendor_ruby/1.9.1/puppet/application.rb:346:in `run'
/usr/lib64/ruby/vendor_ruby/1.9.1/puppet/util/command_line.rb:87:in 
`execute'
/usr/bin/puppet:4:in `'


I'm sure its on the server, but I'm not exactly sure where to look because 
i get the same error in the server logs. I checked the firewall and it goes 
through, I don't know enough arout ruby to hunt down a pson error, but what 
what it looks like there is a syntax error somewhere? Anyone have any ideas?

-- 
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/05afc712-5d1a-4c04-aa31-1670be3a0fe5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Change to issue tracking for Forge & PL Module projects

2014-03-21 Thread Heidi Pio
Hi Everyone,

Quick introduction:  I'm the Engineering Project Manager of the Puppet Labs 
Forge.

And a quick update to let you know that the Puppet Labs Forge and Module 
issue migrations from Redmine and GitHub are now complete.   GitHub issues 
for each module repo have been turned off. 

Puppet Labs Forge issues can now be found here: 
https://tickets.puppetlabs.com/browse/FORGE 
And Puppet Labs Module issues can be found here: 
https://tickets.puppetlabs.com/browse/MODULES 

The pull request process will not change, however, the Puppet Forge 
Community Pull Request Review meeting has moved to Thursdays at 10am PST. 
 Ashley Penney has graciously offered to send out weekly updates for those 
meetings via the Puppet-Dev list. 

Please feel free to contact me if you have any questions about this 
migration or the pull request process. Thanks and have a great weekend!



On Monday, December 16, 2013 7:48:34 AM UTC-8, Ryan Coleman wrote:
As Eric Sorenson noted earlier [1], issue tracking for most projects at 
Puppet Labs are moving to JIRA. This includes the Puppet Forge and the 
Puppet Labs modules on the Forge.


As of this morning, Forge issues in Redmine have been set to read-only and 
have been migrated into the FORGE project in tickets.puppetlabs.com. Each 
Redmine ticket will point you to its companion JIRA ticket. Here's an 
example http://projects.puppetlabs.com/issues/5033 -> 
https://tickets.puppetlabs.com/browse/FORGE-27 


Issue tracking for Puppet Labs Forge modules are also moving. Most are 
moving from GitHub Issues but some were still being tracked in Redmine. 
This morning, we will update the 'Report Issues' link on each module page 
to point to JIRA. Please start filing new issues here: 
https://tickets.puppetlabs.com/browse/MODULES. We're still sorting out the 
software to migrate existing issues without losing critical information. 
Once that's ready, it'll work much like the Forge migration. 


I'll be spending some of my holiday curled up with hot chocolate, caring 
for each of the newly migrated issues. I'll update their states, ensure 
they're properly linked to internal work and try to give you some idea 
where they fit into 2014. If you have an issue you care deeply about, I 
suggest you follow it into JIRA and start watching it. 


I hope you find this transition fairly painless. Please let me know if you 
have any questions, concerns or suggestions. 


[1] https://groups.google.com/d/topic/puppet-users/4lV1cT6Li-M/discussion


-- 

Ryan Coleman | Modules & Forge | ryanycoleman on twitter & #puppet IRC

-- 
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/969b4116-4558-4766-9d91-772a27d054c6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: mount point directory permissions

2014-03-21 Thread Peter Bukowinski
It may not be the nicest way to handle it, but it's not all that cumbersome. If 
your mount command is modifying the permissions, than you can tell it to notify 
an exec resource that fixes the perms.

file { '/app_dir':
  ensure  => 'directory' 
  owner   => 'app_user' 
  group   => 'app_group' 
  mode   => '2775'
} mount { '/app_dir': 
  ensure => mounted,
  atboot => true, 
  device => /dev/mapper/lv_app, 
  fstype => ext3, 
  options => 'defaults', 
  dump => '1', 
  pass => '2',
  require => File['/app_dir'],
  notify => Exec['fix_mount_perms'],
}
exec { 'fix_mount_perms':
  command => 'chmod 2755 /app_dir && chown root:root /app_dir',
  refreshonly => true,
}

Setting the exec's refreshonly parameter to true prevents it from running every 
time, but it will run any time the mount resource changes.

--
Peter Bukowinski

On Mar 21, 2014, at 1:42 PM, Paolo Supino  wrote:

> Hi Guto 
> Too cumbersome: Have to setup a check for ownership, groupship and 
> permissions... :-(
> 
> 
> On Fri, Mar 21, 2014 at 6:28 PM, guto carvalho  wrote:
> Try to use paramters like unless, refreshonly or onlyinf to trigger the 
> command in specific conditions, not every time, inside your exec.
> 
> http://docs.puppetlabs.com/references/latest/type.html#exec-attributes
> http://docs.puppetlabs.com/references/latest/type.html#exec-attribute-refreshonly
> http://docs.puppetlabs.com/references/latest/type.html#exec-attribute-unless
> http://docs.puppetlabs.com/references/latest/type.html#exec-attribute-onlyif
> 
> 
> On Fri, Mar 21, 2014 at 2:19 PM, Paolo Supino  wrote:
> Hi Renan 
> 
> between the solutions I tried was something like this, only that the exec fix 
> permissions got executed on every run of puppet... 
> 
> 
> On Fri, Mar 21, 2014 at 5:53 PM, Renan Vicente  wrote:
> you can use notify for a Exec and use a exec { 'fix permission':
>command => 
> 'chmod 0755 /app_dir ; chown root:root /app_dir'
>}
> something like that, I didn't test but I guess that you work :D
> 
> 
> On Friday, March 21, 2014 1:41:25 PM UTC-3, Paolo wrote:
> Hi 
> 
> I have the following problem: in a certain module I need to set permissions 
> on a directory after the mount was executed. If I do the following 
> 
> file { '/app_dir':
>   ensure  => 'directory' 
>   owner   => 'app_user' 
>   group   => 'app_group' 
>   mode   => '2775'
> } mount { '/app_dir': 
>   ensure => mounted,
>   atboot => true, 
>   device => /dev/mapper/lv_app, 
>   fstype => ext3, 
>   options => 'defaults', 
>   dump => '1', 
>   pass => '2',
>   require => File['/app_dir'],
> }
> 
> This would require 2 rounds of puppet: round 1 to setup directory, mount the 
> filesystem and round 2 to fix permissions set to root:root,0755 by the mount 
> command... 
> 
> In looking for a solution I found the following link: 
> https://projects.puppetlabs.com/issues/4815 that asks for the option to add 
> permission settings to mount resource. The request was rejected and in the 
> comments 
>  Eric Sorenson writes that it would be trivial to accomplish with a defined 
> type, but without going into details... :-( Can any one give me some details 
> on how to do it with a defined type? 
> 
> 
> 
> TIA
> Paolo 
> 
> 
> 
> -- 
> 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/bc2954ad-6c52-4772-8f67-a22d98d81c56%40googlegroups.com.
> 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/CA%2BB25BzXeMtPFpbAK3f5MwjfXSGoZJC1%2BfzsQvyVbTZRjVjCbA%40mail.gmail.com.
> 
> For more options, visit https://groups.google.com/d/optout.
> 
> 
> 
> -- 
> [s]
> Guto Carvalho
> 
> -- 
> 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/CAHTbNE4ZLzh1Ojy7xsjCFaTXMSyPp-5AYYkwHNC2n4JeRuA5%3DA%40mail.gmail.com.
> 
> 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...@

Re: [Puppet Users] Re: mount point directory permissions

2014-03-21 Thread Paolo Supino
Hi Guto
Too cumbersome: Have to setup a check for ownership, groupship and
permissions... :-(


On Fri, Mar 21, 2014 at 6:28 PM, guto carvalho wrote:

> Try to use paramters like unless, refreshonly or onlyinf to trigger the
> command in specific conditions, not every time, inside your exec.
>
> http://docs.puppetlabs.com/references/latest/type.html#exec-attributes
>
> http://docs.puppetlabs.com/references/latest/type.html#exec-attribute-refreshonly
>
> http://docs.puppetlabs.com/references/latest/type.html#exec-attribute-unless
>
> http://docs.puppetlabs.com/references/latest/type.html#exec-attribute-onlyif
>
>
> On Fri, Mar 21, 2014 at 2:19 PM, Paolo Supino wrote:
>
>> Hi Renan
>>
>> between the solutions I tried was something like this, only that the exec
>> fix permissions got executed on every run of puppet...
>>
>>
>> On Fri, Mar 21, 2014 at 5:53 PM, Renan Vicente wrote:
>>
>>> you can use notify for a Exec and use a exec { 'fix permission':
>>>
>>>  command => 'chmod 0755 /app_dir ; chown root:root /app_dir'
>>>}
>>> something like that, I didn't test but I guess that you work :D
>>>
>>>
>>> On Friday, March 21, 2014 1:41:25 PM UTC-3, Paolo wrote:

 Hi

 I have the following problem: in a certain module I need to set
 permissions on a directory after the mount was executed. If I do the
 following

 file { '/app_dir':
   ensure  => 'directory'
   owner   => 'app_user'
   group   => 'app_group'
   mode   => '2775'
 } mount { '/app_dir':
   ensure => mounted,
   atboot => true,
   device => /dev/mapper/lv_app,
   fstype => ext3,
   options => 'defaults',
   dump => '1',
   pass => '2',
   require => File['/app_dir'],
 }

 This would require 2 rounds of puppet: round 1 to setup directory,
 mount the filesystem and round 2 to fix permissions set to root:root,0755
 by the mount command...

 In looking for a solution I found the following link: https://projects.
 puppetlabs.com/issues/4815 that asks for the option to add permission
 settings to mount resource. The request was rejected and in the comments
  Eric Sorenson writes that it would be trivial to accomplish with a
 defined type, but without going into details... :-( Can any one give me
 some details on how to do it with a defined type?



 TIA
 Paolo


   --
>>> 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/bc2954ad-6c52-4772-8f67-a22d98d81c56%40googlegroups.com
>>> .
>>> 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/CA%2BB25BzXeMtPFpbAK3f5MwjfXSGoZJC1%2BfzsQvyVbTZRjVjCbA%40mail.gmail.com
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> [s]
> Guto Carvalho
>
> --
> 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/CAHTbNE4ZLzh1Ojy7xsjCFaTXMSyPp-5AYYkwHNC2n4JeRuA5%3DA%40mail.gmail.com
> .
>
> 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/CA%2BB25ByT%3D2Rffaswtmpn-A_tUfV_VLSKwC8KD_UbvGvPM1vzng%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: puppetlabs-firewall question

2014-03-21 Thread Race Boyer
I have been wondering this myself, I think the best way to find out is to 
try it! So that's exactly what I'm going to do and I will report back what 
happens.

On Thursday, January 23, 2014 2:49:58 PM UTC-6, Ygor wrote:
>
> In the documentation, it says:
>
> With the latest version, we now have in-built persistence, so this is no 
> longer needed. However, you will still need some basic setup to define pre & 
> post rules.
>
> resources { "firewall":
>   purge => true
> }
> Firewall {
>   before  => Class['my_fw::post'],
>   require => Class['my_fw::pre'],
> }
> class { ['my_fw::pre', 'my_fw::post']: }
> class { 'firewall': }
>
> Can this be in the init.pp of the my_fw class or does it still need to be in 
> "site.pp" ?
>
> “Sometimes I think the surest sign that intelligent life exists elsewhere in 
> the universe is that none of it has tried to contact us.”  (Bill Waterson: 
> Calvin & Hobbes)
>
>

-- 
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/29d2d290-04ac-47b6-bbd1-d17378523f34%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: mount point directory permissions

2014-03-21 Thread guto carvalho
Try to use paramters like unless, refreshonly or onlyinf to trigger the
command in specific conditions, not every time, inside your exec.

http://docs.puppetlabs.com/references/latest/type.html#exec-attributes
http://docs.puppetlabs.com/references/latest/type.html#exec-attribute-refreshonly
http://docs.puppetlabs.com/references/latest/type.html#exec-attribute-unless
http://docs.puppetlabs.com/references/latest/type.html#exec-attribute-onlyif


On Fri, Mar 21, 2014 at 2:19 PM, Paolo Supino wrote:

> Hi Renan
>
> between the solutions I tried was something like this, only that the exec
> fix permissions got executed on every run of puppet...
>
>
> On Fri, Mar 21, 2014 at 5:53 PM, Renan Vicente wrote:
>
>> you can use notify for a Exec and use a exec { 'fix permission':
>>
>>  command => 'chmod 0755 /app_dir ; chown root:root /app_dir'
>>}
>> something like that, I didn't test but I guess that you work :D
>>
>>
>> On Friday, March 21, 2014 1:41:25 PM UTC-3, Paolo wrote:
>>>
>>> Hi
>>>
>>> I have the following problem: in a certain module I need to set
>>> permissions on a directory after the mount was executed. If I do the
>>> following
>>>
>>> file { '/app_dir':
>>>   ensure  => 'directory'
>>>   owner   => 'app_user'
>>>   group   => 'app_group'
>>>   mode   => '2775'
>>> } mount { '/app_dir':
>>>   ensure => mounted,
>>>   atboot => true,
>>>   device => /dev/mapper/lv_app,
>>>   fstype => ext3,
>>>   options => 'defaults',
>>>   dump => '1',
>>>   pass => '2',
>>>   require => File['/app_dir'],
>>> }
>>>
>>> This would require 2 rounds of puppet: round 1 to setup directory, mount
>>> the filesystem and round 2 to fix permissions set to root:root,0755 by the
>>> mount command...
>>>
>>> In looking for a solution I found the following link: https://projects.
>>> puppetlabs.com/issues/4815 that asks for the option to add permission
>>> settings to mount resource. The request was rejected and in the comments
>>>  Eric Sorenson writes that it would be trivial to accomplish with a
>>> defined type, but without going into details... :-( Can any one give me
>>> some details on how to do it with a defined type?
>>>
>>>
>>>
>>> TIA
>>> Paolo
>>>
>>>
>>>   --
>> 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/bc2954ad-6c52-4772-8f67-a22d98d81c56%40googlegroups.com
>> .
>> 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/CA%2BB25BzXeMtPFpbAK3f5MwjfXSGoZJC1%2BfzsQvyVbTZRjVjCbA%40mail.gmail.com
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
[s]
Guto Carvalho

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


Re: [Puppet Users] exclusion/exception in server.pp file

2014-03-21 Thread puppetstan
Thanks for your answer, can you have an example with two zones please?

regards

Le jeudi 13 mars 2014 21:07:44 UTC+1, Jose Luis Ledesma a écrit :
>
> Facts + hiera is the short answer.
>
> If different IP ranges means different zones or sites, just create a 
> custom fact that returns the zone/site name. Setup the zone/site 
> hierarchically in hiera and set the data there. Setup a higher level with 
> the hostame in hiera and put the exceptions there.
>
> Regards
> El 13/03/2014 19:28, "puppetstan" > 
> escribió:
>
>> Hi
>>
>> Thanks for your answer.
>>
>> You say This kind of code is screaming, but what is your solution when 
>> you have a lot of server and the only solution is to locate with the IP 
>> address
>>
>> your prefer :
>>
>> node1
>> node2
>> ...
>> node 200
>> ...
>> ??
>>
>> regards
>>
>>
>> Le mercredi 12 mars 2014 19:02:06 UTC+1, Jose Luis Ledesma a écrit :
>>>
>>> Hi,
>>>
>>>   This kind of code is screaming for hiera!
>>>
>>> But if you want to continue this way, just set another if
>>> if $::ipaddress =~ /^172.17.3.4/  {
>>>Data here
>>> } elsif  $::ipaddress =~ /^172.17.3./  {
>>> Another data here
>>> }
>>>  El 12/03/2014 17:40, "puppetstan"  escribió:
>>>
 Hello 

 I have define in my server.pp file diferent zone and I defined my dns 
 servers 
 (resolv_servers). for my /etc/resolv.conf for this zone 


 #Zone 1
 if $::ipaddress =~ /^172.17.3./ {
 $ntp_heure = "ntp.domain.fr"
 $fusioninventory_proxy = "http://proxy.domain.fr:8080";
 $resolv_servers = [ '172.30.12.11', '172.30.12.2' ]
 $resolv_search = "domain.fr"
 $yumconf_proxy = "http://proxy.domain.fr:8080";
 $yumconf_exclude = "kernel*"
 include base::minimal
 }

 The problem is that in this zone one server (172.17.3.4) that does not 
 have 
 the same dns. Is it possible to make an exclusion on this server and 
 specify 
 other addresses ips in this config file? 

 thank you in advance

 -- 
 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...@googlegroups.com.
 To view this discussion on the web visit https://groups.google.com/d/
 msgid/puppet-users/dc908091-8fbe-4e46-a5bb-4e1d1b2e503c%
 40googlegroups.com
 .
 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...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/puppet-users/d79e3ecf-b10b-41e6-b1f3-71a73356f83d%40googlegroups.com
>> .
>> 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/d5357db6-3567-495d-8059-ec3d5cc23cec%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: mount point directory permissions

2014-03-21 Thread Paolo Supino
Hi Renan

between the solutions I tried was something like this, only that the exec
fix permissions got executed on every run of puppet...


On Fri, Mar 21, 2014 at 5:53 PM, Renan Vicente  wrote:

> you can use notify for a Exec and use a exec { 'fix permission':
>command
> => 'chmod 0755 /app_dir ; chown root:root /app_dir'
>}
> something like that, I didn't test but I guess that you work :D
>
>
> On Friday, March 21, 2014 1:41:25 PM UTC-3, Paolo wrote:
>>
>> Hi
>>
>> I have the following problem: in a certain module I need to set
>> permissions on a directory after the mount was executed. If I do the
>> following
>>
>> file { '/app_dir':
>>   ensure  => 'directory'
>>   owner   => 'app_user'
>>   group   => 'app_group'
>>   mode   => '2775'
>> } mount { '/app_dir':
>>   ensure => mounted,
>>   atboot => true,
>>   device => /dev/mapper/lv_app,
>>   fstype => ext3,
>>   options => 'defaults',
>>   dump => '1',
>>   pass => '2',
>>   require => File['/app_dir'],
>> }
>>
>> This would require 2 rounds of puppet: round 1 to setup directory, mount
>> the filesystem and round 2 to fix permissions set to root:root,0755 by the
>> mount command...
>>
>> In looking for a solution I found the following link: https://projects.
>> puppetlabs.com/issues/4815 that asks for the option to add permission
>> settings to mount resource. The request was rejected and in the comments
>>  Eric Sorenson writes that it would be trivial to accomplish with a
>> defined type, but without going into details... :-( Can any one give me
>> some details on how to do it with a defined type?
>>
>>
>>
>> TIA
>> Paolo
>>
>>
>>   --
> 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/bc2954ad-6c52-4772-8f67-a22d98d81c56%40googlegroups.com
> .
> 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/CA%2BB25BzXeMtPFpbAK3f5MwjfXSGoZJC1%2BfzsQvyVbTZRjVjCbA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] How to debug catalog transfer?

2014-03-21 Thread Andy Spiegl
I patched id.rb:

< Facter.add(:id) do
<  setcode "whoami"
< end
---
> Facter.add(:id) do
>   setcode do
> system( "whoami" ).encode("UTF-8")
>   end
> end

Works fine:
id: "nt-autorität\x5csystem"

Unfortunately I STILL get the error when running as service.  I cannot
find anymore umlauts in the yaml file, however.  What else could be
breaking it?

Thanks,
 Andy.

-- 
 Nobody ever went broke underestimating the intelligence of the American public.
   (H. L. Mencken)

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


[Puppet Users] Re: mount point directory permissions

2014-03-21 Thread Renan Vicente
you can use notify for a Exec and use a exec { 'fix permission':
   command 
=> 'chmod 0755 /app_dir ; chown root:root /app_dir'
   }
something like that, I didn't test but I guess that you work :D


On Friday, March 21, 2014 1:41:25 PM UTC-3, Paolo wrote:
>
> Hi 
>
> I have the following problem: in a certain module I need to set 
> permissions on a directory after the mount was executed. If I do the 
> following 
>
> file { '/app_dir':
>   ensure  => 'directory' 
>   owner   => 'app_user' 
>   group   => 'app_group' 
>   mode   => '2775'
> } mount { '/app_dir': 
>   ensure => mounted,
>   atboot => true, 
>   device => /dev/mapper/lv_app, 
>   fstype => ext3, 
>   options => 'defaults', 
>   dump => '1', 
>   pass => '2',
>   require => File['/app_dir'],
> }
>
> This would require 2 rounds of puppet: round 1 to setup directory, mount 
> the filesystem and round 2 to fix permissions set to root:root,0755 by the 
> mount command... 
>
> In looking for a solution I found the following link: 
> https://projects.puppetlabs.com/issues/4815 that asks for the option to 
> add permission settings to mount resource. The request was rejected and in 
> the comments 
>  Eric Sorenson writes that it would be trivial to accomplish with a 
> defined type, but without going into details... :-( Can any one give me 
> some details on how to do it with a defined type? 
>
>
>
> TIA
> Paolo 
>
>
>  

-- 
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/bc2954ad-6c52-4772-8f67-a22d98d81c56%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] mount point directory permissions

2014-03-21 Thread Paolo Supino
Hi

I have the following problem: in a certain module I need to set permissions
on a directory after the mount was executed. If I do the following

file { '/app_dir':
  ensure  => 'directory'
  owner   => 'app_user'
  group   => 'app_group'
  mode   => '2775'
} mount { '/app_dir':
  ensure => mounted,
  atboot => true,
  device => /dev/mapper/lv_app,
  fstype => ext3,
  options => 'defaults',
  dump => '1',
  pass => '2',
  require => File['/app_dir'],
}

This would require 2 rounds of puppet: round 1 to setup directory, mount
the filesystem and round 2 to fix permissions set to root:root,0755 by the
mount command...

In looking for a solution I found the following link:
https://projects.puppetlabs.com/issues/4815 that asks for the option to add
permission settings to mount resource. The request was rejected and in the
comments
 Eric Sorenson writes that it would be trivial to accomplish with a defined
type, but without going into details... :-( Can any one give me some
details on how to do it with a defined type?



TIA
Paolo

-- 
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/CA%2BB25ByVTyra1BssvJMfpOofMRBZBN%2B%3DMyuH%3DpK0XuXWVURwpw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] mcollective agent plugin for git

2014-03-21 Thread lnx1
Hi,

I am trying to locate "git plugin" for mcollective agent to enable git 
deployments from PE console > Live Management > Advanced Tasks tab.

Per Git & Puppet Enterprise: Learn a common toolchain "
http://www.youtube.com/watch?v=h37AfOmZFP0"; (minute 5:15) from PuppetLabs, 
installing this plugin will add the feature for s/w deployments.

I've looked at number of places, including search on Github for 
"mcollective agent" but so far no luck.

Was anybody able to get this working?

Thanks


-- 
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/9e89fc48-e5b1-48c6-ba85-980ba10ed92d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet Agent log messages while CSR is not signed

2014-03-21 Thread bjoern pohl


Am Freitag, 21. März 2014 15:20:36 UTC+1 schrieb Jose Luis Ledesma:
>
> Or you can use autosign.
>
> Regards
>
> Hi Jose,
we're in a not-so-trustworthy network here -  so i can't override this 
security measurement :)

regards,
Björn
  

-- 
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/6dc991ef-b8cd-49b5-b015-ffb1075f4454%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet Agent log messages while CSR is not signed

2014-03-21 Thread bjoern pohl

>
>
>>
> Increase 'runinterval'. See the configuration reference for more details.
>
> Josh
>
>
> Hi Josh, that's what i wondered about. This setting is still default, so 
would have expected 30 minutes. But it tries every 240secs:
Mar 15 01:21:59 h0001 puppet-agent[14358]: Could not request certificate: 
execution expired
Mar 15 01:25:59 h0001 puppet-agent[14358]: Could not request certificate: 
execution expired
Mar 15 01:29:59 h0001 puppet-agent[14358]: Could not request certificate: 
execution expired
Mar 15 01:33:59 h0001 puppet-agent[14358]: Could not request certificate: 
execution expired


best regards,
Björn

-- 
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/941b0082-bdc0-4c0c-a8eb-afb45a6cb3ef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet Agent log messages while CSR is not signed

2014-03-21 Thread José Luis Ledesma
Or you can use autosign.

Regards
El 21/03/2014 15:07, "Josh Cooper"  escribió:

>
>
> On Friday, March 21, 2014, bjoern pohl  wrote:
>
>> Hi,
>> we're currently deploying a lot of puppet clients, and when a client has
>> been set up it generates a lot of messages ( 1 every 4 minutes ) saying
>> that the CSR has not yet been signed by the master.
>>
>> Since we're lazy admin's here ( :) ) it might take some days until
>> someone hits the puppet cert sign button, so this messes up the client logs
>> unnessecarily and application owners looking into the logs are scared what
>> this message means :)
>>
>> Is there any point where I can adjust the intveral where the puppet agent
>> checks this? I think as long as has the client has not been ACked by the
>> server it's enough to try once in an hour
>>
>> best regards,
>> Björn
>>
>>  --
>> 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/737abd45-ae37-4103-bd4c-362a441bc576%40googlegroups.com
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> Increase 'runinterval'. See the configuration reference for more details.
>
> Josh
>
>
> --
> Josh Cooper
> Developer, Puppet Labs
>
> *Join us at PuppetConf 2014, September 23-24 in San Francisco* -* 
> http://bit.ly/pupconf14
> *
> Register now and save $350!
>
>  --
> 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/CA%2Bu97umS6-SNfQN-cwJkBG84kuUVkeTt0mScmV1NT7jCcFycYA%40mail.gmail.com
> .
> 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/CAF_B3deixV4OJKENZxsJU%3Dov7UEMehEKj5O_16RL5T4QZWi4og%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet Agent log messages while CSR is not signed

2014-03-21 Thread Josh Cooper
On Friday, March 21, 2014, bjoern pohl  wrote:

> Hi,
> we're currently deploying a lot of puppet clients, and when a client has
> been set up it generates a lot of messages ( 1 every 4 minutes ) saying
> that the CSR has not yet been signed by the master.
>
> Since we're lazy admin's here ( :) ) it might take some days until someone
> hits the puppet cert sign button, so this messes up the client logs
> unnessecarily and application owners looking into the logs are scared what
> this message means :)
>
> Is there any point where I can adjust the intveral where the puppet agent
> checks this? I think as long as has the client has not been ACked by the
> server it's enough to try once in an hour
>
> best regards,
> Björn
>
>  --
> 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/737abd45-ae37-4103-bd4c-362a441bc576%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

Increase 'runinterval'. See the configuration reference for more details.

Josh


-- 
Josh Cooper
Developer, Puppet Labs

*Join us at PuppetConf 2014, September 23-24 in San Francisco* -*
http://bit.ly/pupconf14
*
Register now and save $350!

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


[Puppet Users] Re: Problem when i try copy a directory with recurse

2014-03-21 Thread Jorge Roberto Martínez Peñaranda
I found my own error, i need remove "files" from source path and now works.

Regards.

El viernes, 21 de marzo de 2014 13:31:12 UTC+1, Jorge Roberto Martínez 
Peñaranda escribió:
>
> Hi all,
>
> I'm new with Puppet, i'm trying to copy a directory with recurse method 
> but don't work, the Puppet server say this:
>
> Info: Could not find filesystem info for file 
> 'modules/vhost-balf/files/2.0' in environment balf
> Info: Not Found: Could not find instances in file_metadata with 
> 'modules/vhost-balf/files/2.0'
> Info: Not Found: Could not find file_metadata modules/vhost-balf/files/2.0
>
> i have this config in the class:
>
> file { "/var/www/vhost.com/html":
> ensure => "directory",
> owner  => "www-data",
> group  => "www-data",
> mode   => 755,
> source => "puppet:///modules/vhost-balf/files/2.0",
> recurse => true,
> }
>
> If i use a custom file mount works, but i can use it because i'm using 
> environments for nodes.
>
> The version in server is 3.4.3-1puppetlabs1.
>
> Thanks.
>

-- 
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/543991b5-b665-4104-b0dd-6249644ccd3f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Puppet Agent log messages while CSR is not signed

2014-03-21 Thread bjoern pohl
Hi,
we're currently deploying a lot of puppet clients, and when a client has 
been set up it generates a lot of messages ( 1 every 4 minutes ) saying 
that the CSR has not yet been signed by the master.

Since we're lazy admin's here ( :) ) it might take some days until someone 
hits the puppet cert sign button, so this messes up the client logs 
unnessecarily and application owners looking into the logs are scared what 
this message means :)

Is there any point where I can adjust the intveral where the puppet agent 
checks this? I think as long as has the client has not been ACked by the 
server it's enough to try once in an hour

best regards,
Björn

-- 
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/737abd45-ae37-4103-bd4c-362a441bc576%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] conditional statement in config.pp

2014-03-21 Thread jcbollinger


On Thursday, March 20, 2014 1:26:56 PM UTC-5, Peter Bukowinski wrote:
>
> On Mar 20, 2014, at 1:26 PM, John > 
> wrote:
>
> Below is a my current config,.pp file  I'm trying to create a 
> condition that says
>
> if (/etc/ldap.conf contains the string host1.mydomain.com or 
> host2.mydomain.com)
>   Then install an sshd_ldap.erb template
>  else if (/etc/ldap.conf contains the string hostB.mydomain.com or 
> hostA.mydomain.com)
>  Then install an sshd_freeIPA.erb template
>else  install a standard template.
>
> The code does not work as written.  Any advice to suggestions would be 
> greatly appreciated.
>
> Thanks in advance.
>
> class ssh::config inherits ssh {
>   file_content { '/etc/ldap.conf':
> ensure => file,
>   }
>
>
> I understand what you're trying to do here, but you seem to have made up 
> some puppet code that it won't know how to handle. You're trying to define 
> a variable by using puppet's resource language. That's not going to work.
>
> What you'll need to do is write a custom facter fact, e.g. 'ldapserver', 
> that will contain the name(s) of the configured ldap server(s). I do this 
> in my environment with the following code, which I place into a puppet 
> module named 'custom' (as documented here 
> http://docs.puppetlabs.com/guides/plugins_in_modules.html):
>
>

+1

Alternatively, it is often better for Puppet to tell instead of ask.  That 
is, where possible, you should avoid making your nodes authorities for 
information that is not directly tied to their identities and hardware.

If you adhere to that principle, then instead of using nodes' LDAP 
configuration to determine which SSH configuration to apply, you would 
manage *both* to appropriate, consistent states.


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/6dd95dc0-9a99-42ca-b1cf-e4801934dffc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Cannot run hadoop commands from manifest file

2014-03-21 Thread jcbollinger


On Friday, March 21, 2014 1:57:45 AM UTC-5, Shouvanik Haldar wrote:
>
> Thanks for the reply.
> Somehow hadoop command is not getting recognised. I am still getting error
>
> err: /Stage[main]//Exec[hadoop-get-scoop]/returns: change from notrun to 0 
> failed: hadoop fs -copyToLocal 
> s3://xxx-xxx-/scripts/mysql-connector-java.jar 
> /home/hadoop/mysql-connector-java.jar returned 1 instead of one of [0] at 
> /root/examples/download-s3files.pp:46
>
>

There are three main possibilities:

   1. The command is running fine, but it exits with code 1 instead of the 
   expected success code, 0.  Generally speaking, Unix commands exit with code 
   0 when they complete successfully, but if hadoop is an oddball that may 
   return code 1 on success then use the Exec's 'returns' property (
   
http://docs.puppetlabs.com/references/3.stable/type.html#exec-attribute-returns)
 
   to tell Puppet that's ok.
   2. The command is not running at all because it is not found in the 
   specified path.  In my example I gave a guess at an appropriate path, but 
   if your hadoop is installed elsewhere then you will need either to use a 
   more appropriate path parameter (
   
http://docs.puppetlabs.com/references/3.stable/type.html#exec-attribute-path) 
   or give the full path to hadoop in the command.
   3. The 'hadoop' command is found, but does not run successfully.  If the 
   same command works when run manually, then the problem is likely with the 
   environment in which it runs.  Puppet intentionally provides a very sparse 
   environment to commands it spawns; anything else you need, such as 
   particular environment variables, you have to arrange for in the Exec.  
   There are the 'path' and 'environment' 
   
(http://docs.puppetlabs.com/references/3.stable/type.html#exec-attribute-environment)
 
   parameters for that, or you can put the needed provisions directly in the 
   command.


Good luck,

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/81244b0e-c7d4-4af2-8b67-30dc0d090272%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Cannot apply changes on puppet agents

2014-03-21 Thread Al Man
Hi!
I have the entry in my site.pp:
user { 'testuser':
name => 'testuser',
ensure => 'present',
home => '/export/home/testuser',
password => '$5$3dA8tfNG$XIKm1FRM3limH12jzdSVjQAcCWzxj64H6BI/n66',
roles => 'root',
managehome => true,
}

But my agents doesnt apply any changes in system:
Info: Caching catalog for testhost.local
Info: Applying configuration version '1395384645'
Finished catalog run in 0.12 seconds

However, local command "puppet apply site.pp" works:
/Stage[main]//User[testuser]/ensure: created
Finished catalog run in 1.55 seconds
Any ideas?

-- 
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/8f141efa-8d51-4a3d-8efe-ff18f69c2563%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Problem when i try copy a directory with recurse

2014-03-21 Thread Jorge Roberto Martínez Peñaranda
Hi all,

I'm new with Puppet, i'm trying to copy a directory with recurse method but 
don't work, the Puppet server say this:

Info: Could not find filesystem info for file 
'modules/vhost-balf/files/2.0' in environment balf
Info: Not Found: Could not find instances in file_metadata with 
'modules/vhost-balf/files/2.0'
Info: Not Found: Could not find file_metadata modules/vhost-balf/files/2.0

i have this config in the class:

file { "/var/www/vhost.com/html":
ensure => "directory",
owner  => "www-data",
group  => "www-data",
mode   => 755,
source => "puppet:///modules/vhost-balf/files/2.0",
recurse => true,
}

If i use a custom file mount works, but i can use it because i'm using 
environments for nodes.

The version in server is 3.4.3-1puppetlabs1.

Thanks.

-- 
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/bd617ccc-85b0-495f-ad7f-ed5543abd8e2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Comparing pathes in puppet

2014-03-21 Thread Roman Alekseev
Hello,

I have two variables:
$a = some_path 
$b = othe_path
and truing to compare it

if $a != $b { do something }
but always these variables are not equal for puppet.
In my case it can be equal, for example 
$a = /var/cache/nginx/proxy_temp
$b = /var/cache/nginx/proxy_temp 

How can it be fixed?



-- 
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/f450f62c-8908-4b62-b8a3-368e79ba3a26%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] How to debug catalog transfer? (new idea!)

2014-03-21 Thread Andy Spiegl
Just checked with an English Windows 7:

  id: "nt authority\x5csystem"

Uhm, so why is it "binary" in the German version?

I suppose decoded this is "NT Authorität\x5csystem" and that's where
the umlaut \x84 comes from which puppet doesn't like.


On 2014-03-20, 21:30, Andy Spiegl wrote:
> > Okay, now we know that the problem has to do with the user SYSTEM.
> > What could he be missing?  Maybe an environment variable?
> 
> I have an idea!  I was playing around with foreman and noticed a new
> error message:
>  root@foreman:~# /etc/puppet/node.rb winpet1
>  Could not send facts to Foreman: "\x84" from ASCII-8BIT to UTF-8
> 
> So I started comparing the yaml files in /var/lib/puppet/yaml/facts/
> and noticed that the "id" variable is strange when puppet is running
> as user SYSTEM:
> 
> < id: "winpet1\x5cadministrator"
> ---
> > id: !binary "bnQtYXV0b3JpdIR0XHN5c3RlbQ==\n"
> 
> If I remove this line from the yaml file /etc/puppet/node.rb does not
> complain anymore!
> 
> Now the new question is: why is the ID garbled in this way?
> 
> Thanks,
>  Andy.
> 

-- 
 Did you know: Women blink nearly twice as much as men.

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


Re: [Puppet Users] versioncmp.rb example

2014-03-21 Thread Nikola Petrov
Create a custom fact for the java version installed. There are some
suggestions here
https://groups.google.com/forum/#!topic/puppet-users/W67dvqS-GdU
then you do something like the following:

$new_version = versioncmp($::java_version, '1.5.0.3') ? {
1   => '1.7.1',
default => $::java_version
}

package { 'jdk':
ensure => $new_version
}

note that this is not tested ;)

-- 
Nikola

On Tue, Mar 11, 2014 at 09:01:46PM -0400, samra40...@aim.com wrote:
> I looked at versioncmp example available out of box.
> 
> 
> It is like strcmp.
> I have a need to write a manifest to check for the existence of java version. 
> If it is 1.5.0.3 or less, upgrade to 1.7.1. This should be done on 10 nodes.
> 
> 
> Appreciate any example to accomplish this task. thanks
> 
> -- 
> 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/8D10BA5C66CB3D1-318-35AA7%40webmail-m260.sysops.aol.com.
> 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/20140321091147.GB3582%40nikolavp-desktop.
For more options, visit https://groups.google.com/d/optout.