Reputation: 331
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
Upvotes: 1
Views: 1074
Reputation: 1
if we are exporting any variable start with FACTER_ , will be treated as facter on puppet/facter installed machine. Like
export FACTER_test_value='myname'
facter |grep -i test_value
test_value => myname
So, with mco we can use following commandto pass facter value
mco rpc shell start command='export FACTER_test_fact=“true1"; puppet agent -t --tags testmodule' -I target-server-name
Upvotes: 0
Reputation: 8223
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.
Upvotes: 1