GithubHelp home page GithubHelp logo

rafael-0317 / ansible Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mrlesmithjr/ansible

0.0 2.0 0.0 36.09 MB

Shell 10.63% Python 46.01% Ruby 27.04% Makefile 0.73% Batchfile 0.74% Perl 0.48% PHP 10.75% PLpgSQL 0.44% ApacheConf 1.24% Erlang 1.93%

ansible's Introduction

Ansible Playbooks and Roles

From me @mrlesmithjr to the community

The goal of this repo is to maintain a consistent configuration across hosts.

This repo will always be updated on a continuous basis and all feedback is encouraged and welcomed.

Requirements

The majority of variables are configurable in group_vars/all
The goal of this is to keep a consistent single place to update site-wide variables.

To ensure all roles are current and up to date you can run the following in the root of this repo..

ansible-galaxy install -r requirements.yml -f -p ./roles --ignore-errors
Playbooks

bootstrap.yml Used as phase one of deployments... bootstraps hosts

site.yml Phase two of deployments... configures base settings and install base packages that should be site-wide

sensu.yml Installs Sensu Server and Sensu Clients

elkstack_prod.yml Builds ELKStack Highly Available, Scalable environment

ELKStack - Requirements

  • Build out the following hosts and modify hosts to reflect name changes lines with [] define a group name to be added to hosts.
  • Lines that contain [1:x] are regex values to define multiple hosts.
[elk-p-nodes]
elk-p-haproxy-[1:2]
elk-p-broker-[1:3]
elk-p-es-[1:3]
elk-p-pre-processor-[1:2]
elk-p-processor-[1:4]

[elk-p-haproxy-nodes]
elk-p-haproxy-[1:2]

[elk-p-broker-nodes]
elk-p-broker-[1:3]

[elk-p-es-nodes]
elk-p-es-[1:3]

[elk-p-pre-processor-nodes]
elk-p-pre-processor-[1:2]

[elk-p-processor-nodes]
elk-p-processor-[1:4]

You will need to update group_vars and host_vars to tailor to your environment... Ex. Host naming and etc.

group_vars/all
group_vars/elk-p-broker-nodes
group_vars/elk-p-es-nodes
group_vars/elk-p-haproxy-nodes
group_vars/elk-p-nodes
group_vars/elk-p-pre-processor-nodes
group_vars/elk-p-processor-nodes
host_vars/elk-p-haproxy-1
host_vars/elk-p-haproxy-2

Example Playbook

ELKStack example playbook....included in this repo

---
- hosts: elk-p-nodes
  remote_user: remote
  sudo: yes
  roles:
    - role: ansible-base
    - role: ansible-network-tweaks

- hosts: elk-p-broker-nodes
  remote_user: remote
  sudo: yes
  roles:
    - role: ansible-redis
      when: use_redis
    - role: ansible-rabbitmq
      when: use_rabbitmq
    - role: ansible-nginx
    - role: ansible-elasticsearch
    - role: ansible-elk-broker
    - role: ansible-elk-kibana

- hosts: elk-p-es-nodes
  remote_user: remote
  sudo: yes
  roles:
    - role: ansible-elasticsearch
    - role: ansible-elk-es

- hosts: elk-p-pre-processor-nodes
  remote_user: remote
  sudo: yes
  roles:
    - role: ansible-logstash
    - role: ansible-elk-pre-processor
    - role: ansible-dnsmasq

- hosts: elk-p-processor-nodes
  remote_user: remote
  sudo: yes
  roles:
    - role: ansible-elasticsearch
    - role: ansible-logstash
    - role: ansible-elk-processor
    - role: ansible-dnsmasq

- hosts: elk-p-haproxy-nodes
  remote_user: remote
  sudo: yes
  roles:
    - role: ansible-logstash
    - role: ansible-haproxy
    - role: ansible-elk-haproxy

License

GNU General Public License Version 2

Author Information

Larry Smith Jr.

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.