Giter Club home page Giter Club logo

ansible-reusable-roles's Introduction

ansible-reusable-roles

Features

  • DigitalOcean Dynamic Inventory
  • GCP Dynamic Inventory
  • Reusable Roles

Roles List

  • exporter
    • node-exporter
    • jmx-exporter
    • mongodb-exporter)
  • apache-kafka
  • apache-zookeeper
  • java11
  • setdatetime
  • unzip
  • supervisor

Prerequisites

  • python3
  • pip3
  • ansible
  • pre-commit

Setup

$ pre-commit install

Usages

All things inside this repository started from playbook directory.

  • Example playbook:
- name: Example
  hosts: "{{ host }}"
  become: yes
  vars_files:
    - "{{ vault_file }}"
  roles:
    # misc
    - misc/supervisor
    - misc/setdatetime
    # exporter
    - role: exporter
      exporter_name: node_exporter

Note:

  • {{ host }} variable defined for target host
  • {{ vault_file }} variable defined for ansible-vault files location, value can be shown inside hosts/group_vars/all.yml files
  • Usages
$ ANSIBLE_CONFIG=~/ansible-reusable-roles/config/config-prod.ini ansible-playbook ~/ansible-reusable-roles/playbook/production/example.yml --extra-var="host=testing"

Roles

All roles for install or setup configuration inside roles directory

Ansible Vault

Store credential variables and value. Try this password xHSyH4fDJPYhYuff

$ ansible-vault edit {env}.vault

or stored password into file

$ ansible-vault edit development.vault --vault-password-file=~/.yourpasswordfile

Other

  • hosts directory Store configuration/variables on host / group level, make sure file naming is same with host_target
  • templates directory Store configuration/variables on global level

To-Do

  • Static Inventory Example

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.