Hi Justin.

In Puppet Free Open Source [FOSS] the user-contributed module path is: 
/etc/puppet/modules/<module name>
In Puppet Enterprise, [PE] the user-contributed module path is: 
/etc/puppetlabs/puppet/modules/<module name>

Modules need to be provisioned in these directories so that they can be 
picked up on a Puppet Agent run.

In your example, user-absent.pp, I note you're not wrapping the resource 
with a class definition. This is required, as below:

*class user-absent {*
  *user {'katie':*
*      ensure => present,*
*    }*
*}*

I'd like you to try the following:

[1] Create the module directory user-absent in the appropriate module path, 
as per your Puppet version [FOSS/PE]

[2] Ensure you change the name of your file from <module 
path>/user-absent/manifests/user-absent.pp to <module 
path>/user-absent/manifests/init.pp

[3] Create a class declaration in: <module path>/user-absent/tests/init.pp, 
containing:

include user-absent

[4] cd to your module path as above, and run:

puppet apply user-absent/tests/init.pp

You should see the katie user created in the output from puppet apply.

Please advise regarding the results.

Also, you may want to have a look at this guide to writing modules:

https://docs.puppetlabs.com/guides/module_guides/bgtm.html


Kind Regards.


David Bryant-Moore.



On Thursday, September 11, 2014 3:49:10 PM UTC+1, Felix.Frank wrote:
>
> On 09/10/2014 09:37 PM, Justin tim wrote: 
> > / 
> > 
> > As seen, the changes do not take place i.e the user doesn't get added. 
> > It simple say's "Catalog finished" without actually doing anything. 
> > / 
>
>
> Can you share the output of the following? 
>
> getent passwd katie 
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/bbad1ca6-ef37-42d2-a600-a0b9b69cd0df%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to