Experimental environment:
puppetserver.rsyslog.org
Mcollective Client +ACTIVEMQ service side +puppet service end
agent1.rsyslog.org
Mcollective Service-Side +puppet Client
Application: Apache
agent2.rsyslog.org
Mcollective Service-Side +puppet Client
Application: Apache+mysql
agent3.rsyslog.org
Mcollective Service-Side +puppet Client
Application: PHP
Experimental process:
Define a list of server variables
List of all server variables
My_apply1=apache
My_apply2=mysql
my_apply3=php
It is recommended that you add to the/etc/profile file for all servers, and then source
Host variables: agent1.rsyslog.org
Vim/etc/profile
My_apply1=apache
Export My_apply1
Export Facterlib=/var/lib/puppet/lib/facter
[Root@agent1 ~]# Source/etc/profile
Host variables: agent2.rsyslog.org
Vim/etc/profile
My_apply1=apache
My_apply2=mysql
Export My_apply1
Export My_apply2
Export Facterlib=/var/lib/puppet/lib/facter
Host variables: agent3.rsyslog.org
Vim/etc/profile
my_apply3=php
Export My_apply3
Export Facterlib=/var/lib/puppet/lib/facter
Ii. Custom Facter
1. Create directory structure
[Root@puppetserver modules]# mkdir public/{modules,manifests,files,lib/facter}-P
2, the server and the node to open the module in the plug-in function
[Root@puppetserver public]# vim/etc/puppet/puppet.conf
[Main]
Pluginsync = True