Skip to content

Instantly share code, notes, and snippets.

View rmullinnix's full-sized avatar

rmullinnix

  • Overland Park
View GitHub Profile
@rmullinnix
rmullinnix / cluster_bounce.yml
Last active January 22, 2021 22:56
Ansible playbook for consul cluster bounce - ansible-playbook -i hosts.dev cluster_bounce.yml --ask-become-pass (peers.tmpl is in roles/consul/templates; sedfile is in roles/consul/files; main.yml is in roles/consul/vars)
---
# This Playbook bounces a consul cluster that is unable to elect a leader
# push peers.json to the consul/raft data directory, change single quotes to doubles, restart consul servers
- hosts: consulservers
become: yes
# update the peers.json file with the correct consul server ip addresses and port
tasks:
- include_vars: roles/consul/vars/main.yml