Andrew Hendry | 1 Nov 2011 02:19
Picon

Re: [Puppet Users] useradd question

Hi Peter,

Where do you call "git::user" and "git::ssh" from?
Maybe the spots where you have require => User['git'], should they be
require => Class['Git::User']?

Andrew.

On Tue, Nov 1, 2011 at 1:21 AM, Peter Horvath
<peter.horvath77 <at> googlemail.com> wrote:
> I am using Ubuntu LTS 10.04 with the backported puppet
> 2.6.1-0ubuntu2~lucid1
>
> I am trying to create user with the following manifests but at the end
> always getting the Could not find user git error message:
> What am i missing, seems the manifest not creating the missing git
> user.
>
> /etc/modules/git/manifests/user.pp
>
> class git::user {
>        user{'install':
>                name            => 'install',
>                ensure          => absent,
>        }
>
>        user{'git':
>                name            => 'git',
>                password        => 'xxxxx',
>                ensure          => present,
(Continue reading)

Jo Rhett | 1 Nov 2011 02:50
Favicon
Gravatar

[Puppet Users] severe bug in 2.6.12: Caught TERM; calling stop

Mon Oct 31 23:03:31 +0000 2011 Puppet (notice): Caught TERM; calling stop

Ever since the 2.6.12 upgrade I've been seeing these reports reach us. As in, about a hundred of a half thou
machines. Most of the time we find that $vardir/state/puppetdlock is in place and blocking further
puppet runs, which requires a manual resolution.

I wrote a quick cron script to look for puppetdlock files older than one hour, remove them and mail me a report
and I've received several dozen in the last few hours.  Something is clearly broken in 2.6.12, we are
backgrading our systems to 2.6.11.

No-- I have no other information than that it crosses all of our machine types, and we have had no significant
changes in our modules in this time period.  Many of the machines which have failed have had zero module or
manifest changes which would apply to them.  I cannot get this to replicate on the command line.

-- 
Jo Rhett
Net Consonance : consonant endings by net philanthropy, open source and other randomness

--

-- 
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet-users <at> googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Steve Shipway | 1 Nov 2011 03:55
Favicon
Gravatar

[Puppet Users] Re: Variable interpolation in class parameters

FWIW, I find I agree with jcbollinger on this one -- the class parameter declaration block is not a code block, so you should not use variables defined there to define other variables in the same block.  That it works at all is surprising, and probably down to the order the parameters are processes (which, as it most likely depends on hash table sequence, is going to appear random)

Best practice would seem to be to make the variables default to null, and then use subsequent evaluations within the class code to perform the relevant defaulting, as he said.

Steve



--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/ocjQmdnOX3sJ.
To post to this group, send email to puppet-users <at> googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Peter Horvath | 1 Nov 2011 05:16

Re: [Puppet Users] useradd question

I call them here.
/etc/puppet/manifests/site.pp

#Puppet Node configurationsnode eurwebtest01 {        include apache2
      include apache2::mods        include apache2::vhost-eurwebtest}
node eurwebtest02 {        include apache2        include
apache2::mods        include apache2::vhost-eurwebtest        include
system       include git       include git::ssh       include
git::user       include git::sudoers}
node eurwebtest03  {        include apache2        include
apache2::mods        include apache2::vhost-eurwebtest        include
system
        include git        include git::ssh        include git::user
     include git::sudoers}

On 1 November 2011 01:19, Andrew Hendry <andrew.hendry <at> gmail.com> wrote:
> Hi Peter,
>
> Where do you call "git::user" and "git::ssh" from?
> Maybe the spots where you have require => User['git'], should they be
> require => Class['Git::User']?
>
> Andrew.
>
> On Tue, Nov 1, 2011 at 1:21 AM, Peter Horvath
> <peter.horvath77 <at> googlemail.com> wrote:
>> I am using Ubuntu LTS 10.04 with the backported puppet
>> 2.6.1-0ubuntu2~lucid1
>>
>> I am trying to create user with the following manifests but at the end
>> always getting the Could not find user git error message:
>> What am i missing, seems the manifest not creating the missing git
>> user.
>>
>> /etc/modules/git/manifests/user.pp
>>
>> class git::user {
>>        user{'install':
>>                name            => 'install',
>>                ensure          => absent,
>>        }
>>
>>        user{'git':
>>                name            => 'git',
>>                password        => 'xxxxx',
>>                ensure          => present,
>>                comment         => 'Git user for puppet',
>>                managehome      => true,
>>                shell           => '/bin/bash',
>>                uid             => '1000',
>>                require         => User['install'],
>>                provider        => 'useradd',
>>        }
>> Some other classes uses this as requirement:
>>
>> /etc/modules/git/manifests/ssh.pp
>>
>> class git::ssh {
>>        package{'ssh':
>>                ensure          => installed,
>>        }
>>
>>        file{'dir':
>>                ensure          => directory,
>>                path            => '/home/git/.ssh',
>>                require         => User['git'],
>>        }
>>
>>        file{'authkey':
>>                path            => '/home/git/.ssh/authorized_keys',
>>                ensure          => file,
>>                source          => '/etc/puppet/modules/git/files/
>> authorized_keys',
>>                owner           => 'git',
>>                group           => 'git',
>>                mode            => '600',
>>                recurse         => true,
>>                require         => User['git'],
>>        }
>>
>> /etc/modules/git/manifests/init.pp
>>
>> class git {
>>        package{'git-core':
>>                ensure => installed,
>>        }
>>
>>        file{'config':
>>                path    => '/etc/puppet/.git/config',
>>                ensure  => file,
>>                source  => '/etc/puppet/modules/git/files/config',
>>        }
>>
>>        file{'post_receive':
>>                path    => '/etc/puppet/.git/hooks/post-receive',
>>                ensure  => file,
>>                source  => '/etc/puppet/modules/git/files/post-
>> receive',
>>        }
>>
>>        file{'dirrights':
>>                path    => '/etc/puppet',
>>                owner   => 'git',
>>                group   => 'root',
>>                mode    => '755',
>>                recurse => true,
>>                require => User['git'],
>>        }
>> }
>>
>>
>> Thank you
>> Peter
>>
>> --
>> You received this message because you are subscribed to the Google Groups "Puppet Users" group.
>> To post to this group, send email to puppet-users <at> googlegroups.com.
>> To unsubscribe from this group, send email to puppet-users+unsubscribe <at> googlegroups.com.
>> For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
>>
>>
>
> --
> You received this message because you are subscribed to the Google Groups "Puppet Users" group.
> To post to this group, send email to puppet-users <at> googlegroups.com.
> To unsubscribe from this group, send email to puppet-users+unsubscribe <at> googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
>
>

--

-- 
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet-users <at> googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Andrew Hendry | 1 Nov 2011 07:05
Picon

Re: [Puppet Users] useradd question

Hi Peter,

Have you tried --debug --noop, looking for lines like these:

debug: /Stage[main]/Git/File[dirrights]/require: requires User[git]
notice: /Stage[main]/Git::User/User[git]/ensure: current_value absent,
should be present (noop)
debug: /Stage[main]/Git::User/User[git]: The container
Class[Git::User] will propagate my refresh event

This little test seems to run ok here.
test.pp
class git::user {
  user {'git':
    name            => 'git',
    ensure          => present,
    comment         => 'Git user for puppet',
 }
}

class git {
  file {'dirrights':
    path    => '/home/ahendry/temp',
    owner   => 'git',
    require => User['git'],
  }
}

include git::user
include git

$ puppet apply --noop test.pp
warning: Could not retrieve fact fqdn
notice: /Stage[main]/Git::User/User[git]/ensure: current_value absent,
should be present (noop)
err: /Stage[main]/Git/File[dirrights]: Could not evaluate: Could not
find user git
notice: Class[Git::User]: Would have triggered 'refresh' from 1 events
notice: Stage[main]: Would have triggered 'refresh' from 1 events
notice: Finished catalog run in 0.05 seconds

On Tue, Nov 1, 2011 at 3:16 PM, Peter Horvath
<peter.horvath77 <at> googlemail.com> wrote:
> I call them here.
> /etc/puppet/manifests/site.pp
>
> #Puppet Node configurationsnode eurwebtest01 {        include apache2
>       include apache2::mods        include apache2::vhost-eurwebtest}
> node eurwebtest02 {        include apache2        include
> apache2::mods        include apache2::vhost-eurwebtest        include
> system       include git       include git::ssh       include
> git::user       include git::sudoers}
> node eurwebtest03  {        include apache2        include
> apache2::mods        include apache2::vhost-eurwebtest        include
> system
>        include git        include git::ssh        include git::user
>      include git::sudoers}
>
> On 1 November 2011 01:19, Andrew Hendry <andrew.hendry <at> gmail.com> wrote:
>> Hi Peter,
>>
>> Where do you call "git::user" and "git::ssh" from?
>> Maybe the spots where you have require => User['git'], should they be
>> require => Class['Git::User']?
>>
>> Andrew.
>>
>> On Tue, Nov 1, 2011 at 1:21 AM, Peter Horvath
>> <peter.horvath77 <at> googlemail.com> wrote:
>>> I am using Ubuntu LTS 10.04 with the backported puppet
>>> 2.6.1-0ubuntu2~lucid1
>>>
>>> I am trying to create user with the following manifests but at the end
>>> always getting the Could not find user git error message:
>>> What am i missing, seems the manifest not creating the missing git
>>> user.
>>>
>>> /etc/modules/git/manifests/user.pp
>>>
>>> class git::user {
>>>        user{'install':
>>>                name            => 'install',
>>>                ensure          => absent,
>>>        }
>>>
>>>        user{'git':
>>>                name            => 'git',
>>>                password        => 'xxxxx',
>>>                ensure          => present,
>>>                comment         => 'Git user for puppet',
>>>                managehome      => true,
>>>                shell           => '/bin/bash',
>>>                uid             => '1000',
>>>                require         => User['install'],
>>>                provider        => 'useradd',
>>>        }
>>> Some other classes uses this as requirement:
>>>
>>> /etc/modules/git/manifests/ssh.pp
>>>
>>> class git::ssh {
>>>        package{'ssh':
>>>                ensure          => installed,
>>>        }
>>>
>>>        file{'dir':
>>>                ensure          => directory,
>>>                path            => '/home/git/.ssh',
>>>                require         => User['git'],
>>>        }
>>>
>>>        file{'authkey':
>>>                path            => '/home/git/.ssh/authorized_keys',
>>>                ensure          => file,
>>>                source          => '/etc/puppet/modules/git/files/
>>> authorized_keys',
>>>                owner           => 'git',
>>>                group           => 'git',
>>>                mode            => '600',
>>>                recurse         => true,
>>>                require         => User['git'],
>>>        }
>>>
>>> /etc/modules/git/manifests/init.pp
>>>
>>> class git {
>>>        package{'git-core':
>>>                ensure => installed,
>>>        }
>>>
>>>        file{'config':
>>>                path    => '/etc/puppet/.git/config',
>>>                ensure  => file,
>>>                source  => '/etc/puppet/modules/git/files/config',
>>>        }
>>>
>>>        file{'post_receive':
>>>                path    => '/etc/puppet/.git/hooks/post-receive',
>>>                ensure  => file,
>>>                source  => '/etc/puppet/modules/git/files/post-
>>> receive',
>>>        }
>>>
>>>        file{'dirrights':
>>>                path    => '/etc/puppet',
>>>                owner   => 'git',
>>>                group   => 'root',
>>>                mode    => '755',
>>>                recurse => true,
>>>                require => User['git'],
>>>        }
>>> }
>>>
>>>
>>> Thank you
>>> Peter
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups "Puppet Users" group.
>>> To post to this group, send email to puppet-users <at> googlegroups.com.
>>> To unsubscribe from this group, send email to puppet-users+unsubscribe <at> googlegroups.com.
>>> For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
>>>
>>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups "Puppet Users" group.
>> To post to this group, send email to puppet-users <at> googlegroups.com.
>> To unsubscribe from this group, send email to puppet-users+unsubscribe <at> googlegroups.com.
>> For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
>>
>>
>
> --
> You received this message because you are subscribed to the Google Groups "Puppet Users" group.
> To post to this group, send email to puppet-users <at> googlegroups.com.
> To unsubscribe from this group, send email to puppet-users+unsubscribe <at> googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
>
>

--

-- 
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet-users <at> googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Peter Meier | 1 Nov 2011 09:10
Picon
Gravatar

Re: [Puppet Users] severe bug in 2.6.12: Caught TERM; calling stop


On 11/01/2011 02:50 AM, Jo Rhett wrote:
> Mon Oct 31 23:03:31 +0000 2011 Puppet (notice): Caught TERM;
> calling stop
> 
> Ever since the 2.6.12 upgrade I've been seeing these reports reach 
> us. As in, about a hundred of a half thou machines. Most of the
> time we find that $vardir/state/puppetdlock is in place and
> blocking further puppet runs, which requires a manual resolution.
> 
> [...]
> 
> No-- I have no other information than that it crosses all of our 
> machine types, and we have had no significant changes in our
> modules in this time period.  Many of the machines which have
> failed have had zero module or manifest changes which would apply
> to them.  I cannot get this to replicate on the command line.
> 

Can you open a bugreport? Having already that information available is
great.

Thanks!

~pete
Peter Horvath | 1 Nov 2011 10:57

Re: [Puppet Users] useradd question

I have other classes and require between classes pps working perfectly

puppet apply --trace --debug /etc/puppet/site.pp

debug: importing '/etc/puppet/modules/apache2/manifests/init.pp' in
environment production
debug: Automatically imported apache2 from apache2 into production
debug: importing '/etc/puppet/modules/apache2/manifests/mods.pp' in
environment production
debug: Automatically imported apache2::mods from apache2/mods into production
debug: importing
'/etc/puppet/modules/apache2/manifests/vhost-eurwebtest.pp' in
environment production
debug: Automatically imported apache2::vhost-eurwebtest from
apache2/vhost-eurwebtest into production
debug: Scope(Class[Apache2::Vhost-eurwebtest]): Retrieving template
/etc/puppet/modules/apache2/templates/vhost.erb
debug: template[/etc/puppet/modules/apache2/templates/vhost.erb]:
Bound template variables for
/etc/puppet/modules/apache2/templates/vhost.erb in 0.00 seconds
debug: template[/etc/puppet/modules/apache2/templates/vhost.erb]:
Interpolated template /etc/puppet/modules/apache2/templates/vhost.erb
in 0.00 seconds
debug: importing '/etc/puppet/modules/system/manifests/init.pp' in
environment production
debug: Automatically imported system from system into production
debug: importing '/etc/puppet/modules/git/manifests/init.pp' in
environment production
debug: Automatically imported git from git into production
debug: importing '/etc/puppet/modules/git/manifests/ssh.pp' in
environment production
debug: Automatically imported git::ssh from git/ssh into production
debug: importing '/etc/puppet/modules/git/manifests/user.pp' in
environment production
debug: Automatically imported git::user from git/user into production
debug: importing '/etc/puppet/modules/git/manifests/sudoers.pp' in
environment production
debug: Automatically imported git::sudoers from git/sudoers into production
debug: Puppet::Type::Package::ProviderPortage: file /usr/bin/emerge
does not exist
debug: Puppet::Type::Package::ProviderPkg: file /usr/bin/pkg does not exist
debug: Puppet::Type::Package::ProviderSun: file /usr/sbin/pkgrm does not exist
debug: Puppet::Type::Package::ProviderSunfreeware: file pkg-get does not exist
debug: Puppet::Type::Package::ProviderAptrpm: file rpm does not exist
debug: Puppet::Type::Package::ProviderYum: file yum does not exist
debug: Puppet::Type::Package::ProviderUrpmi: file urpmi does not exist
debug: Puppet::Type::Package::ProviderOpenbsd: file pkg_add does not exist
debug: Puppet::Type::Package::ProviderAix: file /usr/bin/lslpp does not exist
debug: Puppet::Type::Package::ProviderNim: file /usr/sbin/nimclient
does not exist
debug: Puppet::Type::Package::ProviderUp2date: file
/usr/sbin/up2date-nox does not exist
debug: Puppet::Type::Package::ProviderFink: file /sw/bin/fink does not exist
debug: Puppet::Type::Package::ProviderPortupgrade: file
/usr/local/sbin/pkg_deinstall does not exist
debug: Puppet::Type::Package::ProviderFreebsd: file /usr/sbin/pkg_add
does not exist
debug: Puppet::Type::Package::ProviderRug: file /usr/bin/rug does not exist
debug: Puppet::Type::Package::ProviderPorts: file
/usr/local/sbin/pkg_deinstall does not exist
debug: Puppet::Type::Package::ProviderHpux: file /usr/sbin/swinstall
does not exist
debug: Puppet::Type::Package::ProviderZypper: file /usr/bin/zypper
does not exist
debug: Puppet::Type::Package::ProviderRpm: file rpm does not exist
debug: Puppet::Type::File::ProviderMicrosoft_windows: feature
microsoft_windows is missing
debug: Puppet::Type::Service::ProviderLaunchd: file /bin/launchctl
does not exist
debug: Puppet::Type::Service::ProviderRunit: file /usr/bin/sv does not exist
debug: Puppet::Type::Service::ProviderDaemontools: file /usr/bin/svc
does not exist
debug: Puppet::Type::Service::ProviderGentoo: file /sbin/rc-update
does not exist
debug: Puppet::Type::Service::ProviderRedhat: file /sbin/chkconfig
does not exist
debug: Service[apache](provider=debian): Executing 'ps -ef'
debug: Service[apache](provider=debian): PID is 1191
debug: Puppet::Type::User::ProviderPw: file pw does not exist
debug: Puppet::Type::User::ProviderDirectoryservice: file
/usr/bin/dscl does not exist
debug: Puppet::Type::User::ProviderUser_role_add: file roledel does not exist
debug: Puppet::Type::User::ProviderLdap: true value when expecting false
/usr/lib/ruby/1.8/puppet/type/file/owner.rb:37:in `retrieve'
/usr/lib/ruby/1.8/puppet/type/file/owner.rb:32:in `collect'
/usr/lib/ruby/1.8/puppet/type/file/owner.rb:32:in `retrieve'
/usr/lib/ruby/1.8/puppet/type.rb:695:in `retrieve'
/usr/lib/ruby/1.8/puppet/type.rb:690:in `each'
/usr/lib/ruby/1.8/puppet/type.rb:690:in `retrieve'
/usr/lib/ruby/1.8/puppet/type/file.rb:634:in `retrieve'
/usr/lib/ruby/1.8/puppet/type.rb:703:in `retrieve_resource'
/usr/lib/ruby/1.8/puppet/type.rb:1861:in `to_trans'
/usr/lib/ruby/1.8/puppet/type/file.rb:701:in `to_trans'
/usr/lib/ruby/1.8/puppet/type.rb:1886:in `to_resource'
/usr/lib/ruby/1.8/puppet/type.rb:203:in `uniqueness_key'
/usr/lib/ruby/1.8/puppet/resource/catalog.rb:83:in `add_resource'
/usr/lib/ruby/1.8/puppet/resource/catalog.rb:72:in `each'
/usr/lib/ruby/1.8/puppet/resource/catalog.rb:72:in `add_resource'
/usr/lib/ruby/1.8/puppet/resource/catalog.rb:561:in `to_catalog'
/usr/lib/ruby/1.8/puppet/resource/catalog.rb:531:in `each'
/usr/lib/ruby/1.8/puppet/resource/catalog.rb:531:in `to_catalog'
/usr/lib/ruby/1.8/puppet/resource/catalog.rb:468:in `to_ral'
/usr/lib/ruby/1.8/puppet/application/apply.rb:118:in `main'
/usr/lib/ruby/1.8/puppet/application/apply.rb:35:in `run_command'
/usr/lib/ruby/1.8/puppet/application.rb:300:in `run'
/usr/lib/ruby/1.8/puppet/application.rb:397:in `exit_on_fail'
/usr/lib/ruby/1.8/puppet/application.rb:300:in `run'
/usr/lib/ruby/1.8/puppet/util/command_line.rb:55:in `execute'
/usr/bin/puppet:4
Could not find user git

On 1 November 2011 06:05, Andrew Hendry <andrew.hendry <at> gmail.com> wrote:
> Hi Peter,
>
> Have you tried --debug --noop, looking for lines like these:
>
> debug: /Stage[main]/Git/File[dirrights]/require: requires User[git]
> notice: /Stage[main]/Git::User/User[git]/ensure: current_value absent,
> should be present (noop)
> debug: /Stage[main]/Git::User/User[git]: The container
> Class[Git::User] will propagate my refresh event
>
> This little test seems to run ok here.
> test.pp
> class git::user {
>  user {'git':
>    name            => 'git',
>    ensure          => present,
>    comment         => 'Git user for puppet',
>  }
> }
>
> class git {
>  file {'dirrights':
>    path    => '/home/ahendry/temp',
>    owner   => 'git',
>    require => User['git'],
>  }
> }
>
> include git::user
> include git
>
> $ puppet apply --noop test.pp
> warning: Could not retrieve fact fqdn
> notice: /Stage[main]/Git::User/User[git]/ensure: current_value absent,
> should be present (noop)
> err: /Stage[main]/Git/File[dirrights]: Could not evaluate: Could not
> find user git
> notice: Class[Git::User]: Would have triggered 'refresh' from 1 events
> notice: Stage[main]: Would have triggered 'refresh' from 1 events
> notice: Finished catalog run in 0.05 seconds
>
>
> On Tue, Nov 1, 2011 at 3:16 PM, Peter Horvath
> <peter.horvath77 <at> googlemail.com> wrote:
>> I call them here.
>> /etc/puppet/manifests/site.pp
>>
>> #Puppet Node configurationsnode eurwebtest01 {        include apache2
>>       include apache2::mods        include apache2::vhost-eurwebtest}
>> node eurwebtest02 {        include apache2        include
>> apache2::mods        include apache2::vhost-eurwebtest        include
>> system       include git       include git::ssh       include
>> git::user       include git::sudoers}
>> node eurwebtest03  {        include apache2        include
>> apache2::mods        include apache2::vhost-eurwebtest        include
>> system
>>        include git        include git::ssh        include git::user
>>      include git::sudoers}
>>
>> On 1 November 2011 01:19, Andrew Hendry <andrew.hendry <at> gmail.com> wrote:
>>> Hi Peter,
>>>
>>> Where do you call "git::user" and "git::ssh" from?
>>> Maybe the spots where you have require => User['git'], should they be
>>> require => Class['Git::User']?
>>>
>>> Andrew.
>>>
>>> On Tue, Nov 1, 2011 at 1:21 AM, Peter Horvath
>>> <peter.horvath77 <at> googlemail.com> wrote:
>>>> I am using Ubuntu LTS 10.04 with the backported puppet
>>>> 2.6.1-0ubuntu2~lucid1
>>>>
>>>> I am trying to create user with the following manifests but at the end
>>>> always getting the Could not find user git error message:
>>>> What am i missing, seems the manifest not creating the missing git
>>>> user.
>>>>
>>>> /etc/modules/git/manifests/user.pp
>>>>
>>>> class git::user {
>>>>        user{'install':
>>>>                name            => 'install',
>>>>                ensure          => absent,
>>>>        }
>>>>
>>>>        user{'git':
>>>>                name            => 'git',
>>>>                password        => 'xxxxx',
>>>>                ensure          => present,
>>>>                comment         => 'Git user for puppet',
>>>>                managehome      => true,
>>>>                shell           => '/bin/bash',
>>>>                uid             => '1000',
>>>>                require         => User['install'],
>>>>                provider        => 'useradd',
>>>>        }
>>>> Some other classes uses this as requirement:
>>>>
>>>> /etc/modules/git/manifests/ssh.pp
>>>>
>>>> class git::ssh {
>>>>        package{'ssh':
>>>>                ensure          => installed,
>>>>        }
>>>>
>>>>        file{'dir':
>>>>                ensure          => directory,
>>>>                path            => '/home/git/.ssh',
>>>>                require         => User['git'],
>>>>        }
>>>>
>>>>        file{'authkey':
>>>>                path            => '/home/git/.ssh/authorized_keys',
>>>>                ensure          => file,
>>>>                source          => '/etc/puppet/modules/git/files/
>>>> authorized_keys',
>>>>                owner           => 'git',
>>>>                group           => 'git',
>>>>                mode            => '600',
>>>>                recurse         => true,
>>>>                require         => User['git'],
>>>>        }
>>>>
>>>> /etc/modules/git/manifests/init.pp
>>>>
>>>> class git {
>>>>        package{'git-core':
>>>>                ensure => installed,
>>>>        }
>>>>
>>>>        file{'config':
>>>>                path    => '/etc/puppet/.git/config',
>>>>                ensure  => file,
>>>>                source  => '/etc/puppet/modules/git/files/config',
>>>>        }
>>>>
>>>>        file{'post_receive':
>>>>                path    => '/etc/puppet/.git/hooks/post-receive',
>>>>                ensure  => file,
>>>>                source  => '/etc/puppet/modules/git/files/post-
>>>> receive',
>>>>        }
>>>>
>>>>        file{'dirrights':
>>>>                path    => '/etc/puppet',
>>>>                owner   => 'git',
>>>>                group   => 'root',
>>>>                mode    => '755',
>>>>                recurse => true,
>>>>                require => User['git'],
>>>>        }
>>>> }
>>>>
>>>>
>>>> Thank you
>>>> Peter
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google Groups "Puppet Users" group.
>>>> To post to this group, send email to puppet-users <at> googlegroups.com.
>>>> To unsubscribe from this group, send email to puppet-users+unsubscribe <at> googlegroups.com.
>>>> For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
>>>>
>>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups "Puppet Users" group.
>>> To post to this group, send email to puppet-users <at> googlegroups.com.
>>> To unsubscribe from this group, send email to puppet-users+unsubscribe <at> googlegroups.com.
>>> For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
>>>
>>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups "Puppet Users" group.
>> To post to this group, send email to puppet-users <at> googlegroups.com.
>> To unsubscribe from this group, send email to puppet-users+unsubscribe <at> googlegroups.com.
>> For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
>>
>>
>
> --
> You received this message because you are subscribed to the Google Groups "Puppet Users" group.
> To post to this group, send email to puppet-users <at> googlegroups.com.
> To unsubscribe from this group, send email to puppet-users+unsubscribe <at> googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
>
>

--

-- 
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet-users <at> googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Robert Atkins | 1 Nov 2011 11:15
Picon

[Puppet Users] What's the canonical way to enforce permissions/ownership on a directory subtree?

I've just tried this (we assume /opt/jetty-6.1.26 already exists):

file { "/opt/jetty-6.1.26":
        owner => "jetty",
        group => "users",
        recurse => true,
}

... but it's taking an *age*. What's the Right Way?

Cheers, Robert.

--

-- 
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet-users <at> googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Felix Frank | 1 Nov 2011 12:53
Picon
Favicon

Re: [Puppet Users] Puppet client starting problem !!

Hi,

On 10/31/2011 07:47 AM, Swati Longia wrote:
> I don't even have normal linux commands like useradd or groupadd in this
> OS.

is this a requirement? Because:

> /err: Could not create resources for managing Puppet's files and
> directories in sections [:main, :agent, :ssl]: Could not find a default
> provider for user/

Puppet doesn't seem to be able to work in this environment.

Your basic installation should really comprise the most basic toolchain,
including useradd.

HTH,
Felix

--

-- 
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet-users <at> googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

linuxbsdfreak | 1 Nov 2011 13:04
Picon

[Puppet Users] Phasewise run of puppet

Hi All,

I have a  requirement to initiate puppet runs of different services in
a phase wise manner.  I have the following setup in my nodes.pp

node /^(host1|host2)\.domain\.local$/ inherits basenode {
         include role_service1
}

node /^(host3|host4)\.domain\.local$/ inherits basenode {
         include role_service2
}

Now i want to run puppet on host1 and host3 and then on host2 and
host4. In short i would like to group the hosts into phases

phase1 - host1|host3
phase2 - host2|host4

I would like to make a class something like phase1 and phase2 and then
use mcollective to initiate a puppet run:

mco puppetd -Wphase1 runonce.

I am unable to get an idea how do i accomplish this or change anything
in my manifests. Any suggestions would be of great help.

Regards,
Kevin

--

-- 
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet-users <at> googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.


Gmane