Ask Your Question

need to reboot the agent server after installation the agent

asked 2017-03-16 02:28:00 -0600

kotireddy gravatar image

I am very new to Puppet and please help me .I have installed puppet and puppetdb with different servers using module.Both are up and running ,please verify the below versions information puppetserver version: 2.7.2 puppetdb version: 4.3.2

then trying to install the agent on RHEL 7 and installed successfully , the version of the agent is puppet agent version :4.9.4

after trying to run the command puppet --version or puppet agent --t and unable run the command and showing below error

[root@etstestdom1 puppet]# puppet agent -tv bash: puppet: command not found...

after reboot the agent server we are able to run the command .please confirm is it require to reboot the agent server while install the agent first time?

Thanks & Regards, Kotireddy G

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-03-16 11:20:57 -0600

smarlow gravatar image

updated 2017-03-16 11:21:36 -0600

In brief, it is not necessary to restart your server. Simply enter another shell by running bash, or log out and log in again., or use the fully qualified path to puppet (e.g. /opt/puppetlabs/bin/puppet agent -tv)

Here's an explanation of why that is necessary:

In Linux you can execute commands two ways. You can either fully specify the path to the executable (e.g. /bin/ls) or by just using the executable name and having the OS find it for you (e.g. ls).

In the second case the OS searches the directories specified in the PATH variable for the executable. Typically this includes /bin, /sbin, /usr/bin, etc. The Puppet executables however are installed in /opt/puppetlabs/bin, which by default is not in the PATH. Installing the Puppet agent adds it to the PATH, but in order to get that new value you need to refresh your shell.

In order to refresh your shell you need to log out and back in, or you need to start a new instance by running bash. Rebooting the server also accomplishes this by forcing you to log back in.

Alternatively you can just specify the full path to the executable (/opt/puppetlabs/bin/puppet) so that you don't need PATH set correctly.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2017-03-16 02:28:00 -0600

Seen: 160 times

Last updated: Mar 16 '17