Giter Club home page Giter Club logo

ansible-plugin-cache-kafka's Introduction

  • TODO: EVERYTHING - I used my other plugin for ansible-plugin-cache-kafka as a frame work

Files defined

{{CWD}}/plugins/cache/kafka.py = plugin to write selected ansible varibles to kafka

{{CWD}}/plugins/cache/kafka.ini = Configuration File for the plugin

{{CWD}}/install-playbook.yml = install the prerequisites

{{CWD}}/debug-playbook.yml = test examples playbook

Installation

There is one dependency and makes a copy of the ansible.cfg.example to ansible.cfg (For now)

ansible-playbook install-playbook.yml --ask-become-pass

Configuration Ansible

[defaults]
cache_plugins      = /usr/share/ansible/plugins/cache:{{CWD}}/plugins/cache
stdout_callback=debug
fact_caching = kafka

Configration Kafka.ini

The Kafka.ini is expected to be in the same location as Kafka.py

{{CWD}}/plugins/cache/Kafka.ini This is JSON format because it was quick and easy for me.

{
"######": "List of hostnames",
"es_hostnames": ["localhost"],
"######": "Elastic Search Port number",
"es_port": 9200,
"######": "Elastic Search Index to save data",
"es_index": "ansible_cache",
"######": "directory name, if unset will disable local cache - relative to {{CWD}} or specify full path",
"local_cache_directory": "ansible_cache",
"######": "Write data to local cache",
"write_local_cache_directory": true,
"######": "Read from local cache instead of kafka good for offline testing",
"read_local_cache_directory": true,
"######": "Filter fields because ansible has many thousands of varibles which we don't need",
"field_filter": [
                    "######": "All fields are optional",
                    "ansible_hostname",
                    "ansible_distribution",
                    "ansible_distribution_version",
                    "ansible_architecture",
                    "ansible_product_serial",
                    "ansible_product_name",
                    "ansible_kernel",
                    "ansible_memtotal_mb",
                    "ansible_processor",
                    "ansible_processor_cores",
                    "ansible_processor_count",
                    "ansible_processor_vcpus",
                    "######": "I even support BASIC DOT notitation to only grab certain sub-fields",
                    "ansible_date_time.iso8601_basic"
                ]
}

ansible-plugin-cache-kafka

ansible-plugin-cache-kafka's People

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.