Bash script to install puppet master v3 and puppet agent v3.
puppetinstall -m|-n <node hostname> -d <domain> [-s <puppet master server ip>] [-t <timezone>] [-y]
Either long or short options are allowed.
-m Install puppet master on the system.
-n <hostname> Install puppet agent on the system.
If you use -m tag with this, -n tag will be ignored.
-d <domain> Domain name of the environment. This will act as a
prefix to all the servers of the domain.
eg:
if a server is: server23.dc1.example.com
your domain must be : dc1.example.com
-s <ip> IP address of the puppet master server.
This IP address will added to the /etc/hosts file.
-t <timezone> This will set the system timezone. Default is Etc/UTC
eg:
For Sri Lanka use : Asia/Colombo
-y Forcefully accept the user confirmation.
-h This will print this message.
-v This will activate verbose mode.
$ sudo bash puppetinstall -m -d example.com
This will install puppet master on example.com domain with default timezone as Etc/UTC.
$ sudo bash puppetinstall -n node001 -d example.com -s 192.168.122.1
This will install puppet agent on example.com domain with default timezone as Etc/UTC. Agent hostname will be node001.example.com and will point to the puppet master on 192.168.122.1 server.