On Tuesday, February 24, 2015 at 1:08:17 AM UTC-6, Raj Raju wrote:
>
> Hi,
>
> I am tried to creating the user account on puppet agent.puppet agent is 
> not reflecting my changes.
>
> Edited  */etc/puppetlabs/puppet*/*manifests/site.pp* file as follows:
>
> node 'puppet.client.net' {
>   include user
> }
>
>
>
> Edited  */etc/puppetlabs/puppet/**manifests/**init.pp* file as follows:
>
>
> class user {
>   user { 'hellboy':
>     ensure => present,
>     comment => 'user',
>     home => '/home/hellboy',
>     managehome => true
>   }
> }
>
>
>

First off, it's unclear on which machine you made those changes.  Since you 
are using the agent, the manifests that are effective are those on the 
machine that serves as master.  That can be the same machine on which you 
are running the agent, but typically it is not.

Secondly, a class named "user" should be defined in a manifest file <puppet 
base>/modules/user/manifests/init.pp.  It appear that you are attempting to 
put yours in <puppet base>/manifests/init.pp.  Under some circumstances 
that might nevertheless work, but you should get started on the right foot 
to avoid making a mess that you will later need to clean up.

Note: I'm assuming that /etc/puppetlabs/puppet is the correct Puppet base 
directory (confdir) for your installation.  That's one of the usual 
choices, but not the default.
 

>
>
> After that I have run below command on puppet agent
>
> [root@puppet ~]# puppet agent --test
> Info: Retrieving pluginfacts
> Info: Retrieving plugin
> Info: Loading facts
> Info: Caching catalog for puppet.client.net
> Info: Applying configuration version '1424761232'
> Notice: Finished catalog run in 3.44 seconds
>
>

I suppose you are trying to point out that the log does not mention the 
specified user, but is the user in fact present?  At default verbosity, the 
agent does not report about resources that are already in the correct state.

If the agent is running in daemon mode, then it might have applied your 
config change between when you saved your manifest changes on the master, 
and when you ran the agent manually.  Alternatively, if you created the 
user by some other means, or if you previously ran the agent manually, then 
that user may have been created.  The agent will emit information about 
*all* managed resources if you add the --debug option to your command.

If the debug output does not mention your user resource then it follows 
that you're not working with the manifests that the master is relying on.  
In that case, you might be editing manifests on the agent (and the master 
is a different machine).


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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/6c9e2918-6595-480f-a3b8-d1d104182260%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to