Skip to content

Instantly share code, notes, and snippets.

@jjuarez
Forked from marshyski/mco-examples.sh
Created May 18, 2018 11:59
Show Gist options
  • Save jjuarez/0ac5d7fddffd804d1ece9c4f859254fe to your computer and use it in GitHub Desktop.
Save jjuarez/0ac5d7fddffd804d1ece9c4f859254fe 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