Skip to content

Instantly share code, notes, and snippets.

@marshyski
Created March 26, 2015 15:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save marshyski/e1c6257cf9c2d03c9f13 to your computer and use it in GitHub Desktop.
Save marshyski/e1c6257cf9c2d03c9f13 to your computer and use it in GitHub Desktop.
MCollective Examples
# Swtich to user to use MCO out of the box
sudo -i -u peadmin
# Find all servers in master catalog
mco find
# Find all servers in master catalog and run class reboot
mco find -C reboot
# Find all servers with puppet fact ec2_ami_id
mco find -F ec2_ami_id=ami-05c6e335
# Final all servers with puppet fact operatingsystem=windows and run runonce
mco puppet -F operatingsystem=windows runonce
# Run `puppet agent -t` on all hosts in puppet master catalog
mco puppet runonce
# Run `puppet agent -t` on server web3balancer.example.com
mco puppet runonce -I web3balancer.example.com
# Get stats on puppet last run summary
mco rpc puppet last_run_summary
# Get overall summary statistics of hosts
mco puppet summary
# Run all puppet nodes with noop, dry-run mode
mco puppet runonce --noop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment