Created
March 26, 2015 15:07
-
-
Save marshyski/e1c6257cf9c2d03c9f13 to your computer and use it in GitHub Desktop.
MCollective Examples
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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