Giter Club home page Giter Club logo

puppet-env-manager-agent's Introduction

puppet-env-manager-agent

A Choria/MCollective agent that invokes the puppet-env-manager library to update puppet environments on a puppetserver.

While the puppet-env-manager library is not currently open source, this agent is to demonstrate how a python mcollective agent can be implemented for real world tasks using py-mco-agent

Requirements

Installation

This project is packaged up as a puppet module and published to the forge as optiz0r-mcollective_agent_puppet_env. The easiest way to use it is to add this module to your Puppetfile:

mod "optiz0r-mcollective_agent_puppet_env"

And mcollective::plugin_classes list in hiera:

mcollective::plugin_classes:
  - mcollective_agent_puppet_env

Usage

choria req puppet_env update_all
Discovering nodes .... 1

1 / 1    0s [====================================================================] 100%

puppetserver.example.com

       Added: []
      Failed: []
     Removed: []
   Unchanged: ["development", "production"]
     Updated: []


---- request stats ----
               Nodes: 1 / 1
         Pass / Fail: 1 / 0
        No Responses: 0
Unexpected Responses: 0
          Start Time: 2019-09-18T22:25:57+0100
      Discovery Time: 2.000441088s
        Publish Time: 0s
          Agent Time: 3m8.087353344s
          Total Time: 3m10.087806976s

Or with JSON output for integration into other tools:

choria req puppet_env update_all -j
{
   "agent": "puppet_env",
   "action": "update_all",
   "replies": [
      {
         "sender": "puppetserver.example.com",
         "statuscode": 0,
         "statusmsg": "",
         "data": {
            "added": [],
            "failed": [],
            "removed": [],
            "unchanged": [
               "production",
               "development"
            ],
            "updated": []
         }
      }
   ],
   "request_stats": {
      "requestid": "d8ca514f6ed3498d9d553621f8407e37",
      "no_responses": [],
      "unexpected_responses": [],
      "discovered": 1,
      "failed": 0,
      "ok": 1,
      "responses": 1,
      "publish_time": 0,
      "request_time": 1.9469804,
      "discover_time": 2.0011542,
      "start_time_utc": 1569490017
   },
   "summaries": {}
}

puppet-env-manager-agent's People

Contributors

dependabot[bot] avatar optiz0r avatar

Watchers

 avatar  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.