Issue #1836 has been reported by mccune.

----------------------------------------
Bug #1836: DirectoryService group creation is not idempotent
http://projects.reductivelabs.com/issues/show/1836

Author: mccune
Status: Unreviewed
Priority: Normal
Assigned to: mccune
Category: group
Target version: 
Complexity: Easy
Affected version: 0.24.7
Keywords: mac osx directoryservice group


Under Mac OS X 10.5.6 and Puppet 0.24.7, the Mac OS X DirectoryService provider 
is not properly creating groups on the first execution of puppet.

Consider the manifest:
<pre>
user { 'jpage':
    comment => 'Jimmy Page',
    home => '/Users/jpage',
    shell => '/bin/bash',
    ensure => 'present',
    uid => '505',
    gid => '20',
    password => 
'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000B6F7C02547722F3FF25A4D49505C62383BEF797AE239D6460000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
}
user { 'rplant':
    comment => 'Robert Plant',
    home => '/Users/rplant',
    shell => '/bin/bash',
    ensure => 'present',
    uid => '507',
    gid => '20',
    password => 
'0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006FB0C42E71F291FC079569DA18EE5A6AE8ED8F1B044227AD0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
}
group { 'ledzeppelin':
    members => ['jpage','rplant'],
    ensure => 'present',
    gid => '502'
}
mcx { '/Groups/ledzeppelin':
    require => Group['ledzeppelin'],
    content => '<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" 
"http://www.apple.com/DTDs/PropertyList-1.0.dtd";>
<plist version="1.0">
<dict>
        <key>com.apple.frontrow</key>
        <dict>
                <key>PreventActivation</key>
                <dict>
                        <key>state</key>
                        <string>always</string>
                        <key>value</key>
                        <string>YES</string>
                </dict>
        </dict>
</dict>
</plist>
',
    ensure => 'present'
}
</pre>

Running this manifest into puppet produces:
<pre>
[mcc...@phi ~]$ cat mw2009.pp | ssh yardbird sudo puppet -v
err: //Group[ledzeppelin]/ensure: change from absent to present failed: Could 
not set present on ensure: undefined local variable or method `param' for 
#<Puppet::Type::Group::ProviderDirectoryservice:0x17617a8> at line 23
notice: //Mcx[/Groups/ledzeppelin]: Dependency group[ledzeppelin] has 1 failures
warning: //Mcx[/Groups/ledzeppelin]: Skipping because of failed dependencies
notice: //User[rplant]/ensure: created
notice: //User[jpage]/ensure: created

[mcc...@phi ~]$ cat mw2009.pp | ssh yardbird sudo puppet -v
notice: //Group[ledzeppelin]/gid: defined 'gid' as '502'
notice: //Group[ledzeppelin]/members: defined 'members' as 'jpage,rplant'
notice: //Mcx[/Groups/ledzeppelin]/ensure: created
</pre>



----------------------------------------
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://reductivelabs.com/redmine/my/account

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to