hercules-team/augeasproviders — pull request #100 by raphink (2014-06-06 07:58:31+00:00)
Title: pam: Could not set 'present' on ensure: undefined method `each' for nil:NilClass if arguments is not define

The following code breaks puppet:
```
pam { 'include_password-auth':
service => 'sshd',
type => 'auth',
module => 'password-auth',
control => 'include',
position => 'after last',
}
```

Here is the error:
```
Error: Could not set 'present' on ensure: undefined method `each' for nil:NilClass at 98:/***.pp
/var/lib/puppet/lib/puppet/provider/pam/augeas.rb:106
/var/lib/puppet/lib/augeasproviders/provider.rb:701:in `call'
/var/lib/puppet/lib/augeasproviders/provider.rb:701:in `augopen_internal'
/var/lib/puppet/lib/augeasproviders/provider.rb:146:in `augopen!'
/var/lib/puppet/lib/augeasproviders/provider.rb:786:in `augopen!'
/var/lib/puppet/lib/augeasproviders/provider.rb:201:in `create'
/usr/lib/ruby/site_ruby/1.8/puppet/property/ensure.rb:16:in `set_present'
/usr/lib/ruby/site_ruby/1.8/puppet/property.rb:197:in `send'
/usr/lib/ruby/site_ruby/1.8/puppet/property.rb:197:in `call_valuemethod'
/usr/lib/ruby/site_ruby/1.8/puppet/property.rb:498:in `set'
.....
```

Adding a ''arguments => []'' works:
```
pam { 'include_password-auth':
service => 'sshd',
type => 'auth',
module => 'password-auth',
control => 'include',
position => 'after last',
arguments => []
}
```