Issue #18460 has been updated by Gary Larizza.
Yeah, looks like it's displaying the prefetched value from the start of the run. I'll have to look at the other provider to see how it handles flushing values for a specific resource so it will use a different value from what was initially prefetched. ---------------------------------------- Bug #18460: OSX user provider when used in "puppet resource" does not show correct values https://projects.puppetlabs.com/issues/18460#change-80866 Author: Andrew Parker Status: Unreviewed Priority: Normal Assignee: Category: Target version: Affected Puppet version: 3.0.2 Keywords: osx, provider, user Branch: When the user type is used in "puppet resource" on OSX the output after making a change is the state of the user *before* the change was made rather than *after*. This is different from my expectation and also different from what the provider on an Ubuntu system does. Creating the user initially provides some of the information: <pre> Puppets-Mac:~ development$ sudo puppet resource user puppet ensure=present gid=puppet shell='/sbin/nologin' Notice: /User[puppet]/shell: defined 'shell' as '/sbin/nologin' user { 'puppet': ensure => 'present', gid => '495', } </pre> Then running the same command again provides all of the information: <pre> Puppets-Mac:~ development$ sudo puppet resource user puppet ensure=present gid=puppet shell='/sbin/nologin' user { 'puppet': ensure => 'present', gid => '495', shell => '/sbin/nologin', } </pre> Making a change shows the change was made (/sbin/nologin => /bin/bash), but doesn't show the change in the printed resource <pre> Puppets-Mac:~ development$ sudo puppet resource user puppet ensure=present gid=puppet shell='/sbin/bash' Notice: /User[puppet]/shell: shell changed '/sbin/nologin' to '/bin/bash' user { 'puppet': ensure => 'present', gid => '495', shell => '/sbin/nologin', } </pre> However, running it again will show the changed value. <pre> Puppets-Mac:~ development$ sudo puppet resource user puppet ensure=present gid=puppet shell='/bin/bash' user { 'puppet': ensure => 'present', gid => '495', shell => '/bin/bash', } </pre> It appears that the provider is not doing something right in order for the updated resource to be shown to the user. The user provider for Ubuntu was tried out and it will immediately (without needing to run a second time) show the updated values. This has been tried on 3.0.2 and 3.1.0-rc1. Found during exploratory testing of 3.1.0-rc1 -- 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://projects.puppetlabs.com/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.
