Installation
add following lines to /etc/puppetlabs/puppet/puppet.conf, of course, change puppetmaster to your host name:
you can reduce memory usage - edit /etc/sysconfig/puppetserver file and change JAVA_ARGS to:
then run service:
First manifests
To communicate with agents puppet use 8140 port - we try to open it using puppet in three steps:
- Install module to manage firewalld
- Create new puppet service
- Enable this service for public zone
Module installation
First we need module to manage firewalld - to install it create manifest file, ie. puppet.test.firewalld-install.pp (as you can see I used /root directory, but it does'n matter):
and test (--noop) first manifest:
after this you can apply (without --noop):
of course you could just run:
but it would be too simple ;-)
Create service
Now we can create firewalld service. Create file puppet.test.firewalld-service.pp:
and apply this:
(I cut warnings about depreciated validate functions)
As you can see there is a new file:
Again we could create this file manually, but what for?
Enable service
It's time to use this service. Create file puppet.test.firewalld-apply.pp:
(because public id default parameter zone can be omitted) and apply this:
and check:
This way is more interesting than boring:
Summary
As you can see setting up a test puppet master (and use them) is not so difficult. Configuration files and manifests are easy to understand.
Next step is to manage agents on other hosts...
Add comment