Code Monkey home page Code Monkey logo

mcollective-plugins's Introduction

MCollective Agents

shell : MCollective agent for remote shell commands

mc-yum : MCollective agent for adding / removing / checking packages using yum

mc-etcfacts : MCollective agent for adding / removing / searching for facts in /etc/facts.txt

mc-etcfacts

This agent is based around the etc_facts.rb plugin written by R.I. Pienaar as asll as a blog post from Gary Larizza regarding his implimentation of the /etc/facts.txt external node classifier. I have modified his code and created a new GitHub repository for his puppet external node classifier. The mc-etcfacts program allows modification of the /etc/facts.txt file. I currently use the design pattern of having a local file which I can manipulate to add / remove puppet configurations. Using this MCollective agent I can add a new class to the 'classes' fact, then run puppet with the 'mc-puppetd' agent to pull in the new packages.

SEARCH

Search all servers /etc/facts.txt file for a class called NTP.

[root@server ~]# mc-etcfacts search classes ntp
Do you really want to operate on services unfiltered? (y/n): y

* [ ============================================================> ] 115 / 115

---- fact summary ----
        Nodes: 115 / 115
        Status: 2 * No results, 111 * ntp, 2 * ntp::server
    Elapsed Time: 0.09 s

ADD

In this example, search for all nodes with the snmp class, and add a paramemter to set a local variable of community to password1.

 [root@server ~]# mc-etcfacts -C snmp add parameters community:password1
 
  * [ ============================================================> ] 115 / 115
 
 ---- fact summary ----
         Nodes: 115 / 115
         Status: 115 * added
     Elapsed Time: 0.28 s

REMOVE

In this example I am removing a class from all node names that starts with unused. Remove the class nagios.

 [root@server ~]# mc-etcfacts -I /unused/ remove classes nagios

  * [ ============================================================> ] 3 / 3
 
 ---- fact summary ----
         Nodes: 3 / 3
         Status: 3 * removed
     Elapsed Time: 0.08 s

Changes?

========

2011/04/01 - First revision

2011/06/17 - Added Augeas to set a repo status to enabled / disable. Also added Shellsafe checks for variables.

2012/10/19 - Shell is now compatible/tested with MCollective 2.2.1

Roadmap

======== Adding a single execution framework application for yum

Contact?

========

Jeremy Carroll [email protected] @jeremy_carroll

mcollective-plugins's People

Contributors

phobos182 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.