Skip to content

S3ky/Ansible

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Master - Main ready to consume branch...May be extremely outdated
Dev - Development branch...Bleeding edge functionality (Initially will be completely different than Master due to redesign)

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 44.9%
  • Ruby 23.6%
  • PHP 16.3%
  • Shell 10.9%
  • Makefile 1.0%
  • Batchfile 1.0%
  • Other 2.3%