Skip to content

Instantly share code, notes, and snippets.

@initcron
Last active January 29, 2016 08:04
Show Gist options
  • Select an option

  • Save initcron/4c221202a96d8ae30b58 to your computer and use it in GitHub Desktop.

Select an option

Save initcron/4c221202a96d8ae30b58 to your computer and use it in GitHub Desktop.
mcollective primer with Puppet Enterprise
# On Puppet Enterprise Master
# Login as pe-admin
$ sudo su
$ su - peadmin
# List mco commands, print help
$ mco help
# Ping All Hosts
$ mco ping
$ mco ping --help
# Filter by facts
$ mco ping -F "osfamily=RedHat"
$ mco ping --wf "osfamily=RedHat"
# Find Facts
$ mco facts osfamily
$ mco facts ipaddress_eth1
# Pring Inventory Information for master.example.com
$ mco inventory master.example.com
Check Package Status
$ mco package status httpd
$ mco package status ntp
$ mco package install telnet --wf "hostname=agent"
# Restarting ntpd service on all
$ mco service restart ntpd
or
$ mco service restart ntpd --wf "hostname=agent"
# Check Service Status
$ mco service status ntpd
# Launch Puppet Run on all
$ mco puppet status
$ mco puppet runonce
$ mco puppet status
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment