Hi. Created: class mumble { : random stuff : } class mumble:grouper inherits mumble { group { "somegroup": name => ''somegroup'', members => ''user1,user2,user3'', ensure => present, gid => 123, } } After a time, mumble:grouper ran, before I added user2, and user3 and /etc/group shows: somegroup:x:500: but it doesn''t show what it should show which is: somegroup:x:500:user1,user2,user3 I verified that user1/2/3 all exist in /etc/passwd. My question is, why isn''t Puppet making the right memberships? Do I misunderstand member? Stuart -- 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+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/8585e0e1-5063-47c7-bb8b-5b086df1df1e%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Stuart, In the type reference, the members property states that it requires the ''manages members'' feature (http://docs.puppetlabs.com/references/latest/type.html#group-provider-features), which is available in the aix, directory service, pw and windows_adsi providers, but not the ldap or groupadd providers. Which provider is being used for your group resource? On Mon, Nov 18, 2013 at 11:15 AM, Stuart Cracraft <smcracraft@gmail.com> wrote:> Hi. > > Created: > > class mumble { > : > random stuff > : > } > > class mumble:grouper inherits mumble { > group { "somegroup": > name => ''somegroup'', > members => ''user1,user2,user3'', > ensure => present, > gid => 123, > } > } > > After a time, mumble:grouper ran, before I added > user2, and user3 and /etc/group shows: > > somegroup:x:500: > > but it doesn''t show what it should show which is: > > somegroup:x:500:user1,user2,user3 > > I verified that user1/2/3 all exist in /etc/passwd. > > My question is, why isn''t Puppet making the right memberships? > > Do I misunderstand member? > > Stuart > > > > > -- > 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+unsubscribe@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/puppet-users/8585e0e1-5063-47c7-bb8b-5b086df1df1e%40googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out.-- Matthaus Owens Release Manager, Puppet Labs Join us at PuppetConf 2014, September 23-24 in San Francisco -- 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+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CACD%3DwAf5W8fsY%2BSzGQA7GH0dgsnjGdiP7Pk1H%2BySTBO%2BJWHJqA%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
Just local password file and group files mostly. But some ldap. On Monday, November 18, 2013 11:34:50 AM UTC-8, Matthaus Litteken wrote:> Stuart, > In the type reference, the members property states that it requires > the ''manages members'' feature > ( > http://docs.puppetlabs.com/references/latest/type.html#group-provider-features), > > which is available in the aix, directory service, pw and windows_adsi > providers, but not the ldap or groupadd providers. Which provider is > being used for your group resource? > > On Mon, Nov 18, 2013 at 11:15 AM, Stuart Cracraft <smcra...@gmail.com<javascript:>> > wrote: > > Hi. > > > > Created: > > > > class mumble { > > : > > random stuff > > : > > } > > > > class mumble:grouper inherits mumble { > > group { "somegroup": > > name => ''somegroup'', > > members => ''user1,user2,user3'', > > ensure => present, > > gid => 123, > > } > > } > > > > After a time, mumble:grouper ran, before I added > > user2, and user3 and /etc/group shows: > > > > somegroup:x:500: > > > > but it doesn''t show what it should show which is: > > > > somegroup:x:500:user1,user2,user3 > > > > I verified that user1/2/3 all exist in /etc/passwd. > > > > My question is, why isn''t Puppet making the right memberships? > > > > Do I misunderstand member? > > > > Stuart > > > > > > > > > > -- > > 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 <javascript:>. > > To view this discussion on the web visit > > > https://groups.google.com/d/msgid/puppet-users/8585e0e1-5063-47c7-bb8b-5b086df1df1e%40googlegroups.com. > > > For more options, visit https://groups.google.com/groups/opt_out. > > > > -- > Matthaus Owens > Release Manager, Puppet Labs > > Join us at PuppetConf 2014, September 23-24 in San Francisco >-- 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+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/c5535875-e7a5-47cf-8113-96b2ee6e1334%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Stuart, Unfortunately, that doesn''t tell us which provider is being used. A run with --debug should show which providers are being used. In a test run using the debug flag on a centos 6 box using the group resource you provided, I got output which included: ''Debug: /Group[somegroup]: Provider groupadd does not support features manages_members; not managing attribute members''. If you post the result of running: puppet apply --debug --exec "group { "somegroup": name => ''somegroup'', members => ''user1,user2,user3'', ensure => present, gid => 123, }" that would help determine which group provider is being used and why member management isn''t being applied. On Mon, Nov 18, 2013 at 11:37 AM, Stuart Cracraft <smcracraft@gmail.com> wrote:> > Just local password file and group files mostly. But some ldap. > > On Monday, November 18, 2013 11:34:50 AM UTC-8, Matthaus Litteken wrote: >> >> Stuart, >> In the type reference, the members property states that it requires >> the ''manages members'' feature >> >> (http://docs.puppetlabs.com/references/latest/type.html#group-provider-features), >> which is available in the aix, directory service, pw and windows_adsi >> providers, but not the ldap or groupadd providers. Which provider is >> being used for your group resource? >> >> On Mon, Nov 18, 2013 at 11:15 AM, Stuart Cracraft <smcra...@gmail.com> >> wrote: >> > Hi. >> > >> > Created: >> > >> > class mumble { >> > : >> > random stuff >> > : >> > } >> > >> > class mumble:grouper inherits mumble { >> > group { "somegroup": >> > name => ''somegroup'', >> > members => ''user1,user2,user3'', >> > ensure => present, >> > gid => 123, >> > } >> > } >> > >> > After a time, mumble:grouper ran, before I added >> > user2, and user3 and /etc/group shows: >> > >> > somegroup:x:500: >> > >> > but it doesn''t show what it should show which is: >> > >> > somegroup:x:500:user1,user2,user3 >> > >> > I verified that user1/2/3 all exist in /etc/passwd. >> > >> > My question is, why isn''t Puppet making the right memberships? >> > >> > Do I misunderstand member? >> > >> > Stuart >> > >> > >> > >> > >> > -- >> > 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/8585e0e1-5063-47c7-bb8b-5b086df1df1e%40googlegroups.com. >> > For more options, visit https://groups.google.com/groups/opt_out. >> >> >> >> -- >> Matthaus Owens >> Release Manager, Puppet Labs >> >> Join us at PuppetConf 2014, September 23-24 in San Francisco > > -- > 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+unsubscribe@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/puppet-users/c5535875-e7a5-47cf-8113-96b2ee6e1334%40googlegroups.com. > > For more options, visit https://groups.google.com/groups/opt_out.-- Matthaus Owens Release Manager, Puppet Labs Join us at PuppetConf 2014, September 23-24 in San Francisco -- 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+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CACD%3DwAeyoL6Hpfc%3DoJTC9m9%3DEE_DhDaafRCyoQ8HBBP9rDW62w%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
Here it is: [root@ca-sna-pm01 manifests]# puppet apply --debug --exec " group { "bb": name => ''bb'', ensure => present, gid => 500, members => ''bb,mtg'', } "> > > > > >[0;36mDebug: Puppet::Type::Group::ProviderLdap: true value when expecting false[0m [0;36mDebug: Puppet::Type::Group::ProviderDirectoryservice: file /usr/bin/dscl does not exist[0m [0;36mDebug: Puppet::Type::Group::ProviderPw: file pw does not exist[0m [0;36mDebug: /Group[bb]: Provider groupadd does not support features manages_members; not managing attribute members[0m [0;36mDebug: /Group[bb]: Provider groupadd does not support features libuser; not managing attribute forcelocal[0m [0;36mDebug: Creating default schedules[0m [0;36mDebug: Using settings: adding file resource ''vardir'': ''File[/var/lib/puppet]{:links=>:follow, :ensure=>:directory, :backup=>false, :loglevel=>:debug, :path=>"/var/lib/puppet"}''[0m [0;36mDebug: Using settings: adding file resource ''client_datadir'': ''File[/var/lib/puppet/client_data]{:links=>:follow, :ensure=>:directory, :backup=>false, :mode=>"750", :loglevel=>:debug, :path=>"/var/lib/puppet/client_data"}''[0m [0;36mDebug: Puppet::Type::User::ProviderLdap: true value when expecting false[0m [0;36mDebug: Puppet::Type::User::ProviderDirectoryservice: file /usr/bin/dsimport does not exist[0m [0;36mDebug: Puppet::Type::User::ProviderPw: file pw does not exist[0m [0;36mDebug: Puppet::Type::User::ProviderUser_role_add: file roledel does not exist[0m [0;36mDebug: /User[puppet]: Provider useradd does not support features libuser; not managing attribute forcelocal[0m [0;36mDebug: Using settings: adding file resource ''hostpubkey'': ''File[/var/lib/puppet/ssl/public_keys/ca-sna-pm01.mercurytechnology.com.pem]{:links=>:follow, :ensure=>:file, :backup=>false, :owner=>"puppet", :mode=>"644", :loglevel=>:debug, :path=>"/var/lib/puppet/ssl/public_keys/ca-sna-pm01.mercurytechnology.com.pem"}''[0m [0;36mDebug: Using settings: adding file resource ''rundir'': ''File[/var/run/puppet]{:links=>:follow, :ensure=>:directory, :backup=>false, :mode=>"755", :loglevel=>:debug, :path=>"/var/run/puppet"}''[0m [0;36mDebug: Using settings: adding file resource ''libdir'': ''File[/var/lib/puppet/lib]{:links=>:follow, :ensure=>:directory, :backup=>false, :loglevel=>:debug, :path=>"/var/lib/puppet/lib"}''[0m [0;36mDebug: Using settings: adding file resource ''publickeydir'': ''File[/var/lib/puppet/ssl/public_keys]{:links=>:follow, :ensure=>:directory, :backup=>false, :owner=>"puppet", :loglevel=>:debug, :path=>"/var/lib/puppet/ssl/public_keys"}''[0m [0;36mDebug: Using settings: adding file resource ''privatedir'': ''File[/var/lib/puppet/ssl/private]{:links=>:follow, :ensure=>:directory, :backup=>false, :owner=>"puppet", :mode=>"750", :loglevel=>:debug, :path=>"/var/lib/puppet/ssl/private"}''[0m [0;36mDebug: /Group[puppet]: Provider groupadd does not support features libuser; not managing attribute forcelocal[0m [0;36mDebug: Using settings: adding file resource ''logdir'': ''File[/var/log/puppet]{:links=>:follow, :group=>"puppet", :ensure=>:directory, :backup=>false, :owner=>"puppet", :mode=>"750", :loglevel=>:debug, :path=>"/var/log/puppet"}''[0m [0;36mDebug: Using settings: adding file resource ''statefile'': ''File[/var/lib/puppet/state/state.yaml]{:links=>:follow, :ensure=>:file, :backup=>false, :mode=>"660", :loglevel=>:debug, :path=>"/var/lib/puppet/state/state.yaml"}''[0m [0;36mDebug: Using settings: adding file resource ''hostcert'': ''File[/var/lib/puppet/ssl/certs/ca-sna-pm01.mercurytechnology.com.pem]{:links=>:follow, :ensure=>:file, :backup=>false, :owner=>"puppet", :mode=>"644", :loglevel=>:debug, :path=>"/var/lib/puppet/ssl/certs/ca-sna-pm01.mercurytechnology.com.pem"}''[0m [0;36mDebug: Using settings: adding file resource ''clientbucketdir'': ''File[/var/lib/puppet/clientbucket]{:links=>:follow, :ensure=>:directory, :backup=>false, :mode=>"750", :loglevel=>:debug, :path=>"/var/lib/puppet/clientbucket"}''[0m [0;36mDebug: Using settings: adding file resource ''localcacert'': ''File[/var/lib/puppet/ssl/certs/ca.pem]{:links=>:follow, :ensure=>:file, :backup=>false, :owner=>"puppet", :mode=>"644", :loglevel=>:debug, :path=>"/var/lib/puppet/ssl/certs/ca.pem"}''[0m [0;36mDebug: Using settings: adding file resource ''hostcrl'': ''File[/var/lib/puppet/ssl/crl.pem]{:links=>:follow, :ensure=>:file, :backup=>false, :owner=>"puppet", :mode=>"644", :loglevel=>:debug, :path=>"/var/lib/puppet/ssl/crl.pem"}''[0m [0;36mDebug: Using settings: adding file resource ''lastrunfile'': ''File[/var/lib/puppet/state/last_run_summary.yaml]{:links=>:follow, :ensure=>:file, :backup=>false, :mode=>"644", :loglevel=>:debug, :path=>"/var/lib/puppet/state/last_run_summary.yaml"}''[0m [0;36mDebug: Using settings: adding file resource ''certdir'': ''File[/var/lib/puppet/ssl/certs]{:links=>:follow, :ensure=>:directory, :backup=>false, :owner=>"puppet", :loglevel=>:debug, :path=>"/var/lib/puppet/ssl/certs"}''[0m [0;36mDebug: Using settings: adding file resource ''graphdir'': ''File[/var/lib/puppet/state/graphs]{:links=>:follow, :ensure=>:directory, :backup=>false, :loglevel=>:debug, :path=>"/var/lib/puppet/state/graphs"}''[0m [0;36mDebug: Using settings: adding file resource ''requestdir'': ''File[/var/lib/puppet/ssl/certificate_requests]{:links=>:follow, :ensure=>:directory, :backup=>false, :owner=>"puppet", :loglevel=>:debug, :path=>"/var/lib/puppet/ssl/certificate_requests"}''[0m [0;36mDebug: Using settings: adding file resource ''confdir'': ''File[/etc/puppet]{:links=>:follow, :ensure=>:directory, :backup=>false, :loglevel=>:debug, :path=>"/etc/puppet"}''[0m [0;36mDebug: Using settings: adding file resource ''clientyamldir'': ''File[/var/lib/puppet/client_yaml]{:links=>:follow, :ensure=>:directory, :backup=>false, :mode=>"750", :loglevel=>:debug, :path=>"/var/lib/puppet/client_yaml"}''[0m [0;36mDebug: Using settings: adding file resource ''hostprivkey'': ''File[/var/lib/puppet/ssl/private_keys/ca-sna-pm01.mercurytechnology.com.pem]{:links=>:follow, :ensure=>:file, :backup=>false, :owner=>"puppet", :mode=>"600", :loglevel=>:debug, :path=>"/var/lib/puppet/ssl/private_keys/ca-sna-pm01.mercurytechnology.com.pem"}''[0m [0;36mDebug: Using settings: adding file resource ''resourcefile'': ''File[/var/lib/puppet/state/resources.txt]{:links=>:follow, :ensure=>:file, :backup=>false, :owner=>"root", :mode=>"640", :loglevel=>:debug, :path=>"/var/lib/puppet/state/resources.txt"}''[0m [0;36mDebug: Using settings: adding file resource ''statedir'': ''File[/var/lib/puppet/state]{:links=>:follow, :ensure=>:directory, :backup=>false, :mode=>"1755", :loglevel=>:debug, :path=>"/var/lib/puppet/state"}''[0m [0;36mDebug: Using settings: adding file resource ''lastrunreport'': ''File[/var/lib/puppet/state/last_run_report.yaml]{:links=>:follow, :ensure=>:file, :backup=>false, :mode=>"640", :loglevel=>:debug, :path=>"/var/lib/puppet/state/last_run_report.yaml"}''[0m [0;36mDebug: Using settings: adding file resource ''httplog'': ''File[/var/log/puppet/http.log]{:links=>:follow, :ensure=>:file, :backup=>false, :owner=>"root", :mode=>"640", :loglevel=>:debug, :path=>"/var/log/puppet/http.log"}''[0m [0;36mDebug: Using settings: adding file resource ''ssldir'': ''File[/var/lib/puppet/ssl]{:links=>:follow, :ensure=>:directory, :backup=>false, :owner=>"puppet", :mode=>"771", :loglevel=>:debug, :path=>"/var/lib/puppet/ssl"}''[0m [0;36mDebug: Using settings: adding file resource ''privatekeydir'': ''File[/var/lib/puppet/ssl/private_keys]{:links=>:follow, :ensure=>:directory, :backup=>false, :owner=>"puppet", :mode=>"750", :loglevel=>:debug, :path=>"/var/lib/puppet/ssl/private_keys"}''[0m [0;36mDebug: /File[/var/lib/puppet/ssl/public_keys]: Autorequiring File[/var/lib/puppet/ssl][0m [0;36mDebug: /File[/var/lib/puppet/state/last_run_report.yaml]: Autorequiring File[/var/lib/puppet/state][0m [0;36mDebug: /File[/var/lib/puppet/state/state.yaml]: Autorequiring File[/var/lib/puppet/state][0m [0;36mDebug: /File[/var/lib/puppet/clientbucket]: Autorequiring File[/var/lib/puppet][0m [0;36mDebug: /File[/var/lib/puppet/state/last_run_summary.yaml]: Autorequiring File[/var/lib/puppet/state][0m [0;36mDebug: /File[/var/lib/puppet/ssl/private]: Autorequiring File[/var/lib/puppet/ssl][0m [0;36mDebug: /File[/var/lib/puppet/client_yaml]: Autorequiring File[/var/lib/puppet][0m [0;36mDebug: /File[/var/lib/puppet/ssl/crl.pem]: Autorequiring File[/var/lib/puppet/ssl][0m [0;36mDebug: /File[/var/lib/puppet/ssl/public_keys/ca-sna-pm01.mercurytechnology.com.pem]: Autorequiring File[/var/lib/puppet/ssl/public_keys][0m [0;36mDebug: /File[/var/lib/puppet/ssl/private_keys/ca-sna-pm01.mercurytechnology.com.pem]: Autorequiring File[/var/lib/puppet/ssl/private_keys][0m [0;36mDebug: /File[/var/lib/puppet/ssl/certificate_requests]: Autorequiring File[/var/lib/puppet/ssl][0m [0;36mDebug: /File[/var/lib/puppet/ssl/certs]: Autorequiring File[/var/lib/puppet/ssl][0m [0;36mDebug: /File[/var/lib/puppet/ssl/certs/ca.pem]: Autorequiring File[/var/lib/puppet/ssl/certs][0m [0;36mDebug: /File[/var/lib/puppet/lib]: Autorequiring File[/var/lib/puppet][0m [0;36mDebug: /File[/var/lib/puppet/client_data]: Autorequiring File[/var/lib/puppet][0m [0;36mDebug: /File[/var/lib/puppet/state]: Autorequiring File[/var/lib/puppet][0m [0;36mDebug: /File[/var/lib/puppet/ssl/certs/ca-sna-pm01.mercurytechnology.com.pem]: Autorequiring File[/var/lib/puppet/ssl/certs][0m [0;36mDebug: /File[/var/log/puppet/http.log]: Autorequiring File[/var/log/puppet][0m [0;36mDebug: /File[/var/lib/puppet/state/graphs]: Autorequiring File[/var/lib/puppet/state][0m [0;36mDebug: /File[/var/lib/puppet/ssl/private_keys]: Autorequiring File[/var/lib/puppet/ssl][0m [0;36mDebug: /File[/var/lib/puppet/ssl]: Autorequiring File[/var/lib/puppet][0m [0;36mDebug: /File[/var/lib/puppet/state/resources.txt]: Autorequiring File[/var/lib/puppet/state][0m [0;36mDebug: Finishing transaction 70000528421020[0m [0;36mDebug: Loaded state in 0.00 seconds[0m [0;36mDebug: Loaded state in 0.00 seconds[0m [0;32mInfo: Applying configuration version ''1384804821''[0m [0;36mDebug: /Schedule[daily]: Skipping device resources because running on a host[0m [0;36mDebug: /Schedule[monthly]: Skipping device resources because running on a host[0m [0;36mDebug: /Schedule[hourly]: Skipping device resources because running on a host[0m [0;36mDebug: /Schedule[never]: Skipping device resources because running on a host[0m [0;36mDebug: /Schedule[weekly]: Skipping device resources because running on a host[0m [0;36mDebug: /Schedule[puppet]: Skipping device resources because running on a host[0m [0;36mDebug: Finishing transaction 70000527187220[0m [0;36mDebug: Storing state[0m [0;36mDebug: Stored state in 0.03 seconds[0m [mNotice: Finished catalog run in 0.16 seconds[0m [0;36mDebug: Using settings: adding file resource ''rrddir'': ''File[/var/lib/puppet/rrd]{:links=>:follow, :group=>"puppet", :ensure=>:directory, :backup=>false, :owner=>"puppet", :mode=>"750", :loglevel=>:debug, :path=>"/var/lib/puppet/rrd"}''[0m [0;36mDebug: Finishing transaction 70000528357160[0m [0;36mDebug: Received report to process from ca-sna-pm01.mercurytechnology.com[0m [0;36mDebug: Processing report from ca-sna-pm01.mercurytechnology.com with processor Puppet::Reports::Store[0m [root@ca-sna-pm01 manifests]# [root@ca-sna-pm01 manifests]# [root@ca-sna-pm01 manifests]# [root@ca-sna-pm01 manifests]# [root@ca-sna-pm01 manifests]# [root@ca-sna-pm01 manifests]# [root@ca-sna-pm01 manifests]# !eg egrep bb /etc/group /etc/passwd /etc/group:bb:x:500: /etc/passwd:bb:x:500:500:bb:/home/bb:/bin/bash [root@ca-sna-pm01 manifests]# On Monday, November 18, 2013 11:55:59 AM UTC-8, Matthaus Litteken wrote:> Stuart, > Unfortunately, that doesn''t tell us which provider is being used. A > run with --debug should show which providers are being used. > > In a test run using the debug flag on a centos 6 box using the group > resource you provided, I got output which included: > ''Debug: /Group[somegroup]: Provider groupadd does not support features > manages_members; not managing attribute members''. > > If you post the result of running: > > puppet apply --debug --exec "group { "somegroup": > name => ''somegroup'', > members => ''user1,user2,user3'', > ensure => present, > gid => 123, > }" > > that would help determine which group provider is being used and why > member management isn''t being applied. > > On Mon, Nov 18, 2013 at 11:37 AM, Stuart Cracraft <smcra...@gmail.com<javascript:>> > wrote: > > > > Just local password file and group files mostly. But some ldap. > > > > On Monday, November 18, 2013 11:34:50 AM UTC-8, Matthaus Litteken wrote: > >> > >> Stuart, > >> In the type reference, the members property states that it requires > >> the ''manages members'' feature > >> > >> ( > http://docs.puppetlabs.com/references/latest/type.html#group-provider-features), > > >> which is available in the aix, directory service, pw and windows_adsi > >> providers, but not the ldap or groupadd providers. Which provider is > >> being used for your group resource? > >> > >> On Mon, Nov 18, 2013 at 11:15 AM, Stuart Cracraft <smcra...@gmail.com> > >> wrote: > >> > Hi. > >> > > >> > Created: > >> > > >> > class mumble { > >> > : > >> > random stuff > >> > : > >> > } > >> > > >> > class mumble:grouper inherits mumble { > >> > group { "somegroup": > >> > name => ''somegroup'', > >> > members => ''user1,user2,user3'', > >> > ensure => present, > >> > gid => 123, > >> > } > >> > } > >> > > >> > After a time, mumble:grouper ran, before I added > >> > user2, and user3 and /etc/group shows: > >> > > >> > somegroup:x:500: > >> > > >> > but it doesn''t show what it should show which is: > >> > > >> > somegroup:x:500:user1,user2,user3 > >> > > >> > I verified that user1/2/3 all exist in /etc/passwd. > >> > > >> > My question is, why isn''t Puppet making the right memberships? > >> > > >> > Do I misunderstand member? > >> > > >> > Stuart > >> > > >> > > >> > > >> > > >> > -- > >> > 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/8585e0e1-5063-47c7-bb8b-5b086df1df1e%40googlegroups.com. > > >> > For more options, visit https://groups.google.com/groups/opt_out. > >> > >> > >> > >> -- > >> Matthaus Owens > >> Release Manager, Puppet Labs > >> > >> Join us at PuppetConf 2014, September 23-24 in San Francisco > > > > -- > > 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 <javascript:>. > > To view this discussion on the web visit > > > https://groups.google.com/d/msgid/puppet-users/c5535875-e7a5-47cf-8113-96b2ee6e1334%40googlegroups.com. > > > > > For more options, visit https://groups.google.com/groups/opt_out. > > > > -- > Matthaus Owens > Release Manager, Puppet Labs > > Join us at PuppetConf 2014, September 23-24 in San Francisco >-- 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+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/87b33ab4-e69a-4eb5-9894-fb4ddd954824%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Stuart, Your run also has "[0;36mDebug: /Group[bb]: Provider groupadd does not support features manages_members; not managing attribute members", which indicates the groupadd provider is being used. The groupadd provider does not support the members property. If your end goal is to have those users be members of the group, using the groups property of the user resource will do what you want (http://docs.puppetlabs.com/references/latest/type.html#user-attribute-groups) Something like: group { "somegroup": name => ''somegroup'', ensure => present, gid => 123, } user { ["user1","user2","user3"]: groups => "somegroup", ensure => present, require => Group["somegroup"], } Would probably work (and worked for me in a local test run). On Mon, Nov 18, 2013 at 1:07 PM, Stuart Cracraft <smcracraft@gmail.com> wrote:> Here it is: > > > [root@ca-sna-pm01 manifests]# puppet apply --debug --exec " group { "bb": > > name => ''bb'', > > ensure => present, > > gid => 500, > > members => ''bb,mtg'', > > } > > " > >> > > > > > > > [0;36mDebug: Puppet::Type::Group::ProviderLdap: true value when expecting > false[0m > > [0;36mDebug: Puppet::Type::Group::ProviderDirectoryservice: file > /usr/bin/dscl does not exist[0m > > [0;36mDebug: Puppet::Type::Group::ProviderPw: file pw does not exist[0m > > [0;36mDebug: /Group[bb]: Provider groupadd does not support features > manages_members; not managing attribute members[0m > > [0;36mDebug: /Group[bb]: Provider groupadd does not support features > libuser; not managing attribute forcelocal[0m > > [0;36mDebug: Creating default schedules[0m > > [0;36mDebug: Using settings: adding file resource ''vardir'': > ''File[/var/lib/puppet]{:links=>:follow, :ensure=>:directory, :backup=>false, > :loglevel=>:debug, :path=>"/var/lib/puppet"}''[0m > > [0;36mDebug: Using settings: adding file resource ''client_datadir'': > ''File[/var/lib/puppet/client_data]{:links=>:follow, :ensure=>:directory, > :backup=>false, :mode=>"750", :loglevel=>:debug, > :path=>"/var/lib/puppet/client_data"}''[0m > > > > [0;36mDebug: Puppet::Type::User::ProviderLdap: true value when expecting > false[0m > > [0;36mDebug: Puppet::Type::User::ProviderDirectoryservice: file > /usr/bin/dsimport does not exist[0m > > [0;36mDebug: Puppet::Type::User::ProviderPw: file pw does not exist[0m > > [0;36mDebug: Puppet::Type::User::ProviderUser_role_add: file roledel does > not exist[0m > > [0;36mDebug: /User[puppet]: Provider useradd does not support features > libuser; not managing attribute forcelocal[0m > > [0;36mDebug: Using settings: adding file resource ''hostpubkey'': > ''File[/var/lib/puppet/ssl/public_keys/ca-sna-pm01.mercurytechnology.com.pem]{:links=>:follow, > :ensure=>:file, :backup=>false, :owner=>"puppet", :mode=>"644", > :loglevel=>:debug, > :path=>"/var/lib/puppet/ssl/public_keys/ca-sna-pm01.mercurytechnology.com.pem"}''[0m > > [0;36mDebug: Using settings: adding file resource ''rundir'': > ''File[/var/run/puppet]{:links=>:follow, :ensure=>:directory, :backup=>false, > :mode=>"755", :loglevel=>:debug, :path=>"/var/run/puppet"}''[0m > > [0;36mDebug: Using settings: adding file resource ''libdir'': > ''File[/var/lib/puppet/lib]{:links=>:follow, :ensure=>:directory, > :backup=>false, :loglevel=>:debug, :path=>"/var/lib/puppet/lib"}''[0m > > [0;36mDebug: Using settings: adding file resource ''publickeydir'': > ''File[/var/lib/puppet/ssl/public_keys]{:links=>:follow, :ensure=>:directory, > :backup=>false, :owner=>"puppet", :loglevel=>:debug, > :path=>"/var/lib/puppet/ssl/public_keys"}''[0m > > [0;36mDebug: Using settings: adding file resource ''privatedir'': > ''File[/var/lib/puppet/ssl/private]{:links=>:follow, :ensure=>:directory, > :backup=>false, :owner=>"puppet", :mode=>"750", :loglevel=>:debug, > :path=>"/var/lib/puppet/ssl/private"}''[0m > > [0;36mDebug: /Group[puppet]: Provider groupadd does not support features > libuser; not managing attribute forcelocal[0m > > [0;36mDebug: Using settings: adding file resource ''logdir'': > ''File[/var/log/puppet]{:links=>:follow, :group=>"puppet", > :ensure=>:directory, :backup=>false, :owner=>"puppet", :mode=>"750", > :loglevel=>:debug, :path=>"/var/log/puppet"}''[0m > > [0;36mDebug: Using settings: adding file resource ''statefile'': > ''File[/var/lib/puppet/state/state.yaml]{:links=>:follow, :ensure=>:file, > :backup=>false, :mode=>"660", :loglevel=>:debug, > :path=>"/var/lib/puppet/state/state.yaml"}''[0m > > [0;36mDebug: Using settings: adding file resource ''hostcert'': > ''File[/var/lib/puppet/ssl/certs/ca-sna-pm01.mercurytechnology.com.pem]{:links=>:follow, > :ensure=>:file, :backup=>false, :owner=>"puppet", :mode=>"644", > :loglevel=>:debug, > :path=>"/var/lib/puppet/ssl/certs/ca-sna-pm01.mercurytechnology.com.pem"}''[0m > > [0;36mDebug: Using settings: adding file resource ''clientbucketdir'': > ''File[/var/lib/puppet/clientbucket]{:links=>:follow, :ensure=>:directory, > :backup=>false, :mode=>"750", :loglevel=>:debug, > :path=>"/var/lib/puppet/clientbucket"}''[0m > > [0;36mDebug: Using settings: adding file resource ''localcacert'': > ''File[/var/lib/puppet/ssl/certs/ca.pem]{:links=>:follow, :ensure=>:file, > :backup=>false, :owner=>"puppet", :mode=>"644", :loglevel=>:debug, > :path=>"/var/lib/puppet/ssl/certs/ca.pem"}''[0m > > [0;36mDebug: Using settings: adding file resource ''hostcrl'': > ''File[/var/lib/puppet/ssl/crl.pem]{:links=>:follow, :ensure=>:file, > :backup=>false, :owner=>"puppet", :mode=>"644", :loglevel=>:debug, > :path=>"/var/lib/puppet/ssl/crl.pem"}''[0m > > [0;36mDebug: Using settings: adding file resource ''lastrunfile'': > ''File[/var/lib/puppet/state/last_run_summary.yaml]{:links=>:follow, > :ensure=>:file, :backup=>false, :mode=>"644", :loglevel=>:debug, > :path=>"/var/lib/puppet/state/last_run_summary.yaml"}''[0m > > [0;36mDebug: Using settings: adding file resource ''certdir'': > ''File[/var/lib/puppet/ssl/certs]{:links=>:follow, :ensure=>:directory, > :backup=>false, :owner=>"puppet", :loglevel=>:debug, > :path=>"/var/lib/puppet/ssl/certs"}''[0m > > [0;36mDebug: Using settings: adding file resource ''graphdir'': > ''File[/var/lib/puppet/state/graphs]{:links=>:follow, :ensure=>:directory, > :backup=>false, :loglevel=>:debug, > :path=>"/var/lib/puppet/state/graphs"}''[0m > > [0;36mDebug: Using settings: adding file resource ''requestdir'': > ''File[/var/lib/puppet/ssl/certificate_requests]{:links=>:follow, > :ensure=>:directory, :backup=>false, :owner=>"puppet", :loglevel=>:debug, > :path=>"/var/lib/puppet/ssl/certificate_requests"}''[0m > > [0;36mDebug: Using settings: adding file resource ''confdir'': > ''File[/etc/puppet]{:links=>:follow, :ensure=>:directory, :backup=>false, > :loglevel=>:debug, :path=>"/etc/puppet"}''[0m > > [0;36mDebug: Using settings: adding file resource ''clientyamldir'': > ''File[/var/lib/puppet/client_yaml]{:links=>:follow, :ensure=>:directory, > :backup=>false, :mode=>"750", :loglevel=>:debug, > :path=>"/var/lib/puppet/client_yaml"}''[0m > > [0;36mDebug: Using settings: adding file resource ''hostprivkey'': > ''File[/var/lib/puppet/ssl/private_keys/ca-sna-pm01.mercurytechnology.com.pem]{:links=>:follow, > :ensure=>:file, :backup=>false, :owner=>"puppet", :mode=>"600", > :loglevel=>:debug, > :path=>"/var/lib/puppet/ssl/private_keys/ca-sna-pm01.mercurytechnology.com.pem"}''[0m > > [0;36mDebug: Using settings: adding file resource ''resourcefile'': > ''File[/var/lib/puppet/state/resources.txt]{:links=>:follow, :ensure=>:file, > :backup=>false, :owner=>"root", :mode=>"640", :loglevel=>:debug, > :path=>"/var/lib/puppet/state/resources.txt"}''[0m > > [0;36mDebug: Using settings: adding file resource ''statedir'': > ''File[/var/lib/puppet/state]{:links=>:follow, :ensure=>:directory, > :backup=>false, :mode=>"1755", :loglevel=>:debug, > :path=>"/var/lib/puppet/state"}''[0m > > [0;36mDebug: Using settings: adding file resource ''lastrunreport'': > ''File[/var/lib/puppet/state/last_run_report.yaml]{:links=>:follow, > :ensure=>:file, :backup=>false, :mode=>"640", :loglevel=>:debug, > :path=>"/var/lib/puppet/state/last_run_report.yaml"}''[0m > > [0;36mDebug: Using settings: adding file resource ''httplog'': > ''File[/var/log/puppet/http.log]{:links=>:follow, :ensure=>:file, > :backup=>false, :owner=>"root", :mode=>"640", :loglevel=>:debug, > :path=>"/var/log/puppet/http.log"}''[0m > > [0;36mDebug: Using settings: adding file resource ''ssldir'': > ''File[/var/lib/puppet/ssl]{:links=>:follow, :ensure=>:directory, > :backup=>false, :owner=>"puppet", :mode=>"771", :loglevel=>:debug, > :path=>"/var/lib/puppet/ssl"}''[0m > > [0;36mDebug: Using settings: adding file resource ''privatekeydir'': > ''File[/var/lib/puppet/ssl/private_keys]{:links=>:follow, > :ensure=>:directory, :backup=>false, :owner=>"puppet", :mode=>"750", > :loglevel=>:debug, :path=>"/var/lib/puppet/ssl/private_keys"}''[0m > > [0;36mDebug: /File[/var/lib/puppet/ssl/public_keys]: Autorequiring > File[/var/lib/puppet/ssl][0m > > [0;36mDebug: /File[/var/lib/puppet/state/last_run_report.yaml]: > Autorequiring File[/var/lib/puppet/state][0m > > [0;36mDebug: /File[/var/lib/puppet/state/state.yaml]: Autorequiring > File[/var/lib/puppet/state][0m > > [0;36mDebug: /File[/var/lib/puppet/clientbucket]: Autorequiring > File[/var/lib/puppet][0m > > [0;36mDebug: /File[/var/lib/puppet/state/last_run_summary.yaml]: > Autorequiring File[/var/lib/puppet/state][0m > > [0;36mDebug: /File[/var/lib/puppet/ssl/private]: Autorequiring > File[/var/lib/puppet/ssl][0m > > [0;36mDebug: /File[/var/lib/puppet/client_yaml]: Autorequiring > File[/var/lib/puppet][0m > > [0;36mDebug: /File[/var/lib/puppet/ssl/crl.pem]: Autorequiring > File[/var/lib/puppet/ssl][0m > > [0;36mDebug: > /File[/var/lib/puppet/ssl/public_keys/ca-sna-pm01.mercurytechnology.com.pem]: > Autorequiring File[/var/lib/puppet/ssl/public_keys][0m > > [0;36mDebug: > /File[/var/lib/puppet/ssl/private_keys/ca-sna-pm01.mercurytechnology.com.pem]: > Autorequiring File[/var/lib/puppet/ssl/private_keys][0m > > [0;36mDebug: /File[/var/lib/puppet/ssl/certificate_requests]: Autorequiring > File[/var/lib/puppet/ssl][0m > > [0;36mDebug: /File[/var/lib/puppet/ssl/certs]: Autorequiring > File[/var/lib/puppet/ssl][0m > > [0;36mDebug: /File[/var/lib/puppet/ssl/certs/ca.pem]: Autorequiring > File[/var/lib/puppet/ssl/certs][0m > > [0;36mDebug: /File[/var/lib/puppet/lib]: Autorequiring > File[/var/lib/puppet][0m > > [0;36mDebug: /File[/var/lib/puppet/client_data]: Autorequiring > File[/var/lib/puppet][0m > > [0;36mDebug: /File[/var/lib/puppet/state]: Autorequiring > File[/var/lib/puppet][0m > > [0;36mDebug: > /File[/var/lib/puppet/ssl/certs/ca-sna-pm01.mercurytechnology.com.pem]: > Autorequiring File[/var/lib/puppet/ssl/certs][0m > > [0;36mDebug: /File[/var/log/puppet/http.log]: Autorequiring > File[/var/log/puppet][0m > > [0;36mDebug: /File[/var/lib/puppet/state/graphs]: Autorequiring > File[/var/lib/puppet/state][0m > > [0;36mDebug: /File[/var/lib/puppet/ssl/private_keys]: Autorequiring > File[/var/lib/puppet/ssl][0m > > [0;36mDebug: /File[/var/lib/puppet/ssl]: Autorequiring > File[/var/lib/puppet][0m > > [0;36mDebug: /File[/var/lib/puppet/state/resources.txt]: Autorequiring > File[/var/lib/puppet/state][0m > > > > [0;36mDebug: Finishing transaction 70000528421020[0m > > [0;36mDebug: Loaded state in 0.00 seconds[0m > > [0;36mDebug: Loaded state in 0.00 seconds[0m > > [0;32mInfo: Applying configuration version ''1384804821''[0m > > [0;36mDebug: /Schedule[daily]: Skipping device resources because running on > a host[0m > > [0;36mDebug: /Schedule[monthly]: Skipping device resources because running > on a host[0m > > [0;36mDebug: /Schedule[hourly]: Skipping device resources because running on > a host[0m > > [0;36mDebug: /Schedule[never]: Skipping device resources because running on > a host[0m > > [0;36mDebug: /Schedule[weekly]: Skipping device resources because running on > a host[0m > > [0;36mDebug: /Schedule[puppet]: Skipping device resources because running on > a host[0m > > [0;36mDebug: Finishing transaction 70000527187220[0m > > [0;36mDebug: Storing state[0m > > [0;36mDebug: Stored state in 0.03 seconds[0m > > [mNotice: Finished catalog run in 0.16 seconds[0m > > [0;36mDebug: Using settings: adding file resource ''rrddir'': > ''File[/var/lib/puppet/rrd]{:links=>:follow, :group=>"puppet", > :ensure=>:directory, :backup=>false, :owner=>"puppet", :mode=>"750", > :loglevel=>:debug, :path=>"/var/lib/puppet/rrd"}''[0m > > [0;36mDebug: Finishing transaction 70000528357160[0m > > [0;36mDebug: Received report to process from > ca-sna-pm01.mercurytechnology.com[0m > > [0;36mDebug: Processing report from ca-sna-pm01.mercurytechnology.com with > processor Puppet::Reports::Store[0m > > [root@ca-sna-pm01 manifests]# [root@ca-sna-pm01 manifests]# > [root@ca-sna-pm01 manifests]# [root@ca-sna-pm01 manifests]# > > [root@ca-sna-pm01 manifests]# > > [root@ca-sna-pm01 manifests]# > > [root@ca-sna-pm01 manifests]# !eg > > egrep bb /etc/group /etc/passwd > > /etc/group:bb:x:500: > > /etc/passwd:bb:x:500:500:bb:/home/bb:/bin/bash > > [root@ca-sna-pm01 manifests]# > > > > > On Monday, November 18, 2013 11:55:59 AM UTC-8, Matthaus Litteken wrote: >> >> Stuart, >> Unfortunately, that doesn''t tell us which provider is being used. A >> run with --debug should show which providers are being used. >> >> In a test run using the debug flag on a centos 6 box using the group >> resource you provided, I got output which included: >> ''Debug: /Group[somegroup]: Provider groupadd does not support features >> manages_members; not managing attribute members''. >> >> If you post the result of running: >> >> puppet apply --debug --exec "group { "somegroup": >> name => ''somegroup'', >> members => ''user1,user2,user3'', >> ensure => present, >> gid => 123, >> }" >> >> that would help determine which group provider is being used and why >> member management isn''t being applied. >> >> On Mon, Nov 18, 2013 at 11:37 AM, Stuart Cracraft <smcra...@gmail.com> >> wrote: >> > >> > Just local password file and group files mostly. But some ldap. >> > >> > On Monday, November 18, 2013 11:34:50 AM UTC-8, Matthaus Litteken wrote: >> >> >> >> Stuart, >> >> In the type reference, the members property states that it requires >> >> the ''manages members'' feature >> >> >> >> >> >> (http://docs.puppetlabs.com/references/latest/type.html#group-provider-features), >> >> which is available in the aix, directory service, pw and windows_adsi >> >> providers, but not the ldap or groupadd providers. Which provider is >> >> being used for your group resource? >> >> >> >> On Mon, Nov 18, 2013 at 11:15 AM, Stuart Cracraft <smcra...@gmail.com> >> >> wrote: >> >> > Hi. >> >> > >> >> > Created: >> >> > >> >> > class mumble { >> >> > : >> >> > random stuff >> >> > : >> >> > } >> >> > >> >> > class mumble:grouper inherits mumble { >> >> > group { "somegroup": >> >> > name => ''somegroup'', >> >> > members => ''user1,user2,user3'', >> >> > ensure => present, >> >> > gid => 123, >> >> > } >> >> > } >> >> > >> >> > After a time, mumble:grouper ran, before I added >> >> > user2, and user3 and /etc/group shows: >> >> > >> >> > somegroup:x:500: >> >> > >> >> > but it doesn''t show what it should show which is: >> >> > >> >> > somegroup:x:500:user1,user2,user3 >> >> > >> >> > I verified that user1/2/3 all exist in /etc/passwd. >> >> > >> >> > My question is, why isn''t Puppet making the right memberships? >> >> > >> >> > Do I misunderstand member? >> >> > >> >> > Stuart >> >> > >> >> > >> >> > >> >> > >> >> > -- >> >> > 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/8585e0e1-5063-47c7-bb8b-5b086df1df1e%40googlegroups.com. >> >> > For more options, visit https://groups.google.com/groups/opt_out. >> >> >> >> >> >> >> >> -- >> >> Matthaus Owens >> >> Release Manager, Puppet Labs >> >> >> >> Join us at PuppetConf 2014, September 23-24 in San Francisco >> > >> > -- >> > 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/c5535875-e7a5-47cf-8113-96b2ee6e1334%40googlegroups.com. >> > >> > For more options, visit https://groups.google.com/groups/opt_out. >> >> >> >> -- >> Matthaus Owens >> Release Manager, Puppet Labs >> >> Join us at PuppetConf 2014, September 23-24 in San Francisco > > -- > 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+unsubscribe@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/puppet-users/87b33ab4-e69a-4eb5-9894-fb4ddd954824%40googlegroups.com. > > For more options, visit https://groups.google.com/groups/opt_out.-- Matthaus Owens Release Manager, Puppet Labs Join us at PuppetConf 2014, September 23-24 in San Francisco -- 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+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CACD%3DwAcYMMZ5F5phXdKK-ebK4RDG3_NdvG4RORH3F%2BX_Vf5_Wg%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
I bet members needs to be an array when you specify more than one value. http://docs.puppetlabs.com/puppet/3/reference/lang_datatypes.html#arrays On Monday, November 18, 2013, Stuart Cracraft wrote:> Hi. > > Created: > > class mumble { > : > random stuff > : > } > > class mumble:grouper inherits mumble { > group { "somegroup": > name => ''somegroup'', > members => ''user1,user2,user3'', > ensure => present, > gid => 123, > } > } > > After a time, mumble:grouper ran, before I added > user2, and user3 and /etc/group shows: > > somegroup:x:500: > > but it doesn''t show what it should show which is: > > somegroup:x:500:user1,user2,user3 > > I verified that user1/2/3 all exist in /etc/passwd. > > My question is, why isn''t Puppet making the right memberships? > > Do I misunderstand member? > > Stuart > > > > > -- > 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+unsubscribe@googlegroups.com <javascript:_e({}, > ''cvml'', ''puppet-users%2Bunsubscribe@googlegroups.com'');>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/puppet-users/8585e0e1-5063-47c7-bb8b-5b086df1df1e%40googlegroups.com > . > For more options, visit https://groups.google.com/groups/opt_out. >-- 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+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAPGcbtAeK86jXCC-B7wCQsFatyYyGcVK8-9YhQrZZfGLMAb-7A%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
Oops my mail client hadn''t loaded the replies, it looks like Matthaus has it. But yeah you do also need to use arrays when there are multiple values. Rich On Monday, November 18, 2013, Rich Burroughs wrote:> I bet members needs to be an array when you specify more than one value. > > http://docs.puppetlabs.com/puppet/3/reference/lang_datatypes.html#arrays > > > > > On Monday, November 18, 2013, Stuart Cracraft wrote: > >> Hi. >> >> Created: >> >> class mumble { >> : >> random stuff >> : >> } >> >> class mumble:grouper inherits mumble { >> group { "somegroup": >> name => ''somegroup'', >> members => ''user1,user2,user3'', >> ensure => present, >> gid => 123, >> } >> } >> >> After a time, mumble:grouper ran, before I added >> user2, and user3 and /etc/group shows: >> >> somegroup:x:500: >> >> but it doesn''t show what it should show which is: >> >> somegroup:x:500:user1,user2,user3 >> >> I verified that user1/2/3 all exist in /etc/passwd. >> >> My question is, why isn''t Puppet making the right memberships? >> >> Do I misunderstand member? >> >> Stuart >> >> >> >> >> -- >> 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+unsubscribe@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/puppet-users/8585e0e1-5063-47c7-bb8b-5b086df1df1e%40googlegroups.com >> . >> For more options, visit https://groups.google.com/groups/opt_out. >> >-- 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+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAPGcbtDVm6BqgVW02XYJFa69rOhDHm0Qpe3zjopunYUL%2BWY28g%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
Is there a way to assign the uids in the user {["user1", "user2"]: .... } expression? On Monday, November 18, 2013 3:47:10 PM UTC-8, Rich Burroughs wrote:> I bet members needs to be an array when you specify more than one value. > > http://docs.puppetlabs.com/puppet/3/reference/lang_datatypes.html#arrays > > > > > On Monday, November 18, 2013, Stuart Cracraft wrote: > >> Hi. >> >> Created: >> >> class mumble { >> : >> random stuff >> : >> } >> >> class mumble:grouper inherits mumble { >> group { "somegroup": >> name => ''somegroup'', >> members => ''user1,user2,user3'', >> ensure => present, >> gid => 123, >> } >> } >> >> After a time, mumble:grouper ran, before I added >> user2, and user3 and /etc/group shows: >> >> somegroup:x:500: >> >> but it doesn''t show what it should show which is: >> >> somegroup:x:500:user1,user2,user3 >> >> I verified that user1/2/3 all exist in /etc/passwd. >> >> My question is, why isn''t Puppet making the right memberships? >> >> Do I misunderstand member? >> >> Stuart >> >> >> >> >> -- >> 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+unsubscribe@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/puppet-users/8585e0e1-5063-47c7-bb8b-5b086df1df1e%40googlegroups.com >> . >> For more options, visit https://groups.google.com/groups/opt_out. >> >-- 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+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/6b1c2004-54bd-4ea1-bd5b-513a94447caf%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
If you really mean assign, no. UIDs are managed through the user resource type: http://docs.puppetlabs.com/references/latest/type.html#user Rich On Monday, November 18, 2013, Stuart Cracraft wrote:> Is there a way to assign the uids in the user {["user1", "user2"]: .... } > expression? > > > On Monday, November 18, 2013 3:47:10 PM UTC-8, Rich Burroughs wrote: > >> I bet members needs to be an array when you specify more than one value. >> >> http://docs.puppetlabs.com/puppet/3/reference/lang_datatypes.html#arrays >> >> >> >> >> On Monday, November 18, 2013, Stuart Cracraft wrote: >> >>> Hi. >>> >>> Created: >>> >>> class mumble { >>> : >>> random stuff >>> : >>> } >>> >>> class mumble:grouper inherits mumble { >>> group { "somegroup": >>> name => ''somegroup'', >>> members => ''user1,user2,user3'', >>> ensure => present, >>> gid => 123, >>> } >>> } >>> >>> After a time, mumble:grouper ran, before I added >>> user2, and user3 and /etc/group shows: >>> >>> somegroup:x:500: >>> >>> but it doesn''t show what it should show which is: >>> >>> somegroup:x:500:user1,user2,user3 >>> >>> I verified that user1/2/3 all exist in /etc/passwd. >>> >>> My question is, why isn''t Puppet making the right memberships? >>> >>> Do I misunderstand member? >>> >>> Stuart >>> >>> >>> >>> >>> -- >>> 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+unsubscribe@googlegroups.com. >>> To view this discussion on the web visit https://groups.google.com/d/ >>> msgid/puppet-users/8585e0e1-5063-47c7-bb8b-5b086df1df1e% >>> 40googlegroups.com. >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >> -- > 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+unsubscribe@googlegroups.com <javascript:_e({}, > ''cvml'', ''puppet-users%2Bunsubscribe@googlegroups.com'');>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/puppet-users/6b1c2004-54bd-4ea1-bd5b-513a94447caf%40googlegroups.com > . > For more options, visit https://groups.google.com/groups/opt_out. >-- 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+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAPGcbtCADPaop9QazQd3YGbZK%2BtX72OktuHKoyVt4OrbWf-KLg%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
Thanks. On Nov 18, 2013, at 8:41 PM, Rich Burroughs <rich@richburroughs.com> wrote:> If you really mean assign, no. UIDs are managed through the user resource type: > > http://docs.puppetlabs.com/references/latest/type.html#user > > > Rich > > On Monday, November 18, 2013, Stuart Cracraft wrote: > Is there a way to assign the uids in the user {["user1", "user2"]: .... } expression? > > > On Monday, November 18, 2013 3:47:10 PM UTC-8, Rich Burroughs wrote: > I bet members needs to be an array when you specify more than one value. > > http://docs.puppetlabs.com/puppet/3/reference/lang_datatypes.html#arrays > > > > > On Monday, November 18, 2013, Stuart Cracraft wrote: > Hi. > > Created: > > class mumble { > : > random stuff > : > } > > class mumble:grouper inherits mumble { > group { "somegroup": > name => ''somegroup'', > members => ''user1,user2,user3'', > ensure => present, > gid => 123, > } > } > > After a time, mumble:grouper ran, before I added > user2, and user3 and /etc/group shows: > > somegroup:x:500: > > but it doesn''t show what it should show which is: > > somegroup:x:500:user1,user2,user3 > > I verified that user1/2/3 all exist in /etc/passwd. > > My question is, why isn''t Puppet making the right memberships? > > Do I misunderstand member? > > Stuart > > > > > -- > 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+unsubscribe@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/8585e0e1-5063-47c7-bb8b-5b086df1df1e%40googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > > -- > 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+unsubscribe@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/6b1c2004-54bd-4ea1-bd5b-513a94447caf%40googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > > -- > You received this message because you are subscribed to a topic in the Google Groups "Puppet Users" group. > To unsubscribe from this topic, visit https://groups.google.com/d/topic/puppet-users/39Qwntp2yrs/unsubscribe. > To unsubscribe from this group and all its topics, send an email to puppet-users+unsubscribe@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAPGcbtCADPaop9QazQd3YGbZK%2BtX72OktuHKoyVt4OrbWf-KLg%40mail.gmail.com. > For more options, visit https://groups.google.com/groups/opt_out.-- 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+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/37234FFE-4656-4BDA-9DF3-2E2369D31543%40me.com. For more options, visit https://groups.google.com/groups/opt_out.
On Monday, November 18, 2013 10:41:39 PM UTC-6, Rich Burroughs wrote:> > If you really mean assign, no. UIDs are managed through the user resource > type: > > http://docs.puppetlabs.com/references/latest/type.html#user > > >Well, that''s what Stuart is using. He switched up on you. I take the question to be "is there a way to declare different UIDs for different users in an array-titled User declaration?". The basic answer is "not as such". The whole point of the array-title resource declaration shortcut is that all the resources declared via any one such declaration get the same parameter declarations. That does not mean you cannot both use compact forms and assign different parameters per user, however. There are several alternatives. One of the simpler ones is to use resource parameter defaults (beware: unlike variables, parameter defaults have dynamic scope) and multiple-distinct resources per resource declaration block. Example: class mymodule::users { # These default parameters apply to all Users declared # in this dynamic scope: User { ensure => ''present'', gid => ''users'', managehome => true, shell => ''/bin/bash'' } # such as these: user { ''alice'': uid => 501; ''bob'': uid => 502; ''charlie'': uid => 503; } } Another alternative is to use a defined-type wrapper to adapt your data source to the User resource type: class mymodule { # A data source: $user_uids = { ''david'' => 504, ''emily'' => 505, ''frank'' => 506 } } # An adapter definition: define mymodule::local_user( $ensure = ''present'', $gid = ''users'', $managehome = ''true'', $shell = ''/bin/bash'') { include ''mymodule'' user { $title: ensure => $ensure, # Here''s where the magic happens: uid => $mymodule::user_uids[$title], gid => $gid, managehome => $managehome, shell => $shell } } # The resource-declaring class: class mymodule::other_users { include ''mymodule'' # The keys() function is from the puppetlabs-stdlib module $declared_users = keys($mymodule::user_uids) mymodule::local_user { $declared_users: } } That''s not an improvement for so few users, but by the time you get up even to tens of users it''s a win. Moreover, it''s all driven by the single data source, so you there is no risk of different data sources falling out of sync with each other. If the point is to keep your manifests simple, but you don''t mind the data being complex and repetitive, then you also have the option of declaring multiple resources of the same type with whatever parameters you want via the built-in create_resources() function. That might make sense if the data are being loaded from an external source, perhaps via Hiera (recommended): class my_module::still_more_users { $user_data = hiera(''still_more_users'') create_resources(''user'', $user_data) } You can''t get much simpler than that on the manifest side, but you need to express all the non-default parameter values in the data. 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+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/06b0c9bf-c8a4-4005-b6e8-58f69721a4e0%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.