I have different manifest files in puppet server. two questions I have.
Is there a way to use tags to do it? ie, do different set of operations using different tags
The master picks the manifest for each agent going by the respective $certname
value. It is used for looking up node
blocks in your manifest.
However, you are not bound to structure your manifest by node
. If security is not much of a concern, you could use a custom fact like so
# site.pp
case $::task {
'taskA': { include taskA }
'taskB': { include taskB }
...
}
Then pass the desired value using
FACTER_task=taskB puppet agent --onetime --no-daemonize
It should not be difficult to teach mco
to do something to that effect.