From da20da9097f688802fbb05ad1194a5df61fc8a68 Mon Sep 17 00:00:00 2001 From: Antoine Schildknecht <antoine.schildknecht@ubicast.eu> Date: Wed, 3 Jun 2020 13:04:32 +0000 Subject: [PATCH] Add high-availibility playbook --- Makefile | 15 +++++++++++++++ site-ha.yml | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100755 site-ha.yml diff --git a/Makefile b/Makefile index 20b28d13..b78ce7d2 100644 --- a/Makefile +++ b/Makefile @@ -75,6 +75,21 @@ endif $(ANSIBLE_BIN) -i $(i) -l $(l) -m ping all $(ANSIBLE_PLAYBOOK_BIN) -i $(i) site.yml -e conf_update=true -l $(l) -t $(t) +.PHONY: deploy-ha +## deploy-ha: Run deployment playbooks : i=<inventory-path>, l=<host-or-group>, t=<tag> +deploy-ha: +ifndef i + $(error i is undefined) +endif +ifndef l + $(eval l=all) +endif +ifndef t + $(eval t=all) +endif + $(ANSIBLE_BIN) -i $(i) -l $(l) -m ping all + $(ANSIBLE_PLAYBOOK_BIN) -i $(i) site-ha.yml -e conf_update=true -l $(l) -t $(t) + .PHONY: image-validate ## image-validate: Check that Packer image is valid : build=<path-to-packer-file> image-validate: diff --git a/site-ha.yml b/site-ha.yml new file mode 100755 index 00000000..a05ec425 --- /dev/null +++ b/site-ha.yml @@ -0,0 +1,34 @@ +#!/usr/bin/env ansible-playbook +--- + +- name: PYTHON + hosts: all + gather_facts: false + tasks: + - name: ensure python3 is installed + register: python_install + changed_when: "'es_pyinstall' in python_install.stdout_lines" + raw: command -v python3 || echo es_pyinstall && apt update && apt install -y python3-minimal python3-apt + +- import_playbook: playbooks/postgres-ha.yml + tags: postgres +- import_playbook: playbooks/msmonitor.yml + tags: monitor +- import_playbook: playbooks/mirismanager.yml + tags: manager +- import_playbook: playbooks/wowza.yml + tags: wowza +- import_playbook: playbooks/celerity.yml + tags: celerity +- import_playbook: playbooks/mediaworker.yml + tags: worker +- import_playbook: playbooks/mediaserver.yml + tags: server +- import_playbook: playbooks/mediavault.yml + tags: vault +- import_playbook: playbooks/mediaimport.yml + tags: import +- import_playbook: playbooks/netcapture.yml + tags: netcapture + +... -- GitLab