----- Original Message -----
> From: "mcollective-users" <[email protected]>
> To: "mcollective-users" <[email protected]>
> Sent: Thursday, 27 October, 2016 15:16:54
> Subject: [mcollective-users] passing values to environment variable using mco

> Hi,
> 
>    I'm trying to trigger puppet agent specific to environment using
> mcollective. I'm using the command *"mco puppet runonce --environment
> <environment name>"*, but it's not able to filter the node specific to the
> mentioned environment instead triggers all the nodes configured under
> Puppet server. I have created a group 'Dev environment' with 'Production
> environment' as a parent group in PE console, have added a node under 'Dev
> environment'. I'm running the command* "**puppet config print modulepath
> --section master --environment <environment name>"* to cross check if the
> child group exists & it works fine.
> 
>     When we try to run the command *"** mco puppet runonce -W
> environment=production"* it's returning the message *"**No request sent, we
> did not discover any nodes"*.
> 
> 
>    Can anyone please help me with the correct method to accomplish it, or
> help me with the required configuration to be done in  any of the conf
> files.


the --environment is there to SET the environment of the puppet run you are 
requesting

Filters are the -W, -F, -C (or --with, --with-fact, --with-class) and 
environment
is special as its not a fact at this point anymore, so suggest you check with
`mco inventory some.node` and see what facts is available for you to use in 
filters

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"mcollective-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to