From b51739e6cbcf0e115d39d030c78e39ea18a54564 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Thu, 2 Apr 2020 17:42:05 +0200 Subject: [PATCH] add readme for inventory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jakub SokoĊ‚owski --- ansible/inventory/README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 ansible/inventory/README.md diff --git a/ansible/inventory/README.md b/ansible/inventory/README.md new file mode 100644 index 0000000..895fdf0 --- /dev/null +++ b/ansible/inventory/README.md @@ -0,0 +1,24 @@ +# Description + +The files here are Ansible inventory files generated by [`ansible/terraform.py`](/ansible/terraform.py). + +Their purpose is an emergency inventory backup in case of failure or unavailability of Consul. + +# Usage + +To use simply provide the file for the given stage using the `-i` argument. + +For example, if you want to run Ansible on mailservers of `eth.test` fleet while Consul is unavailable do: +```bash +ansible-playbook ansible/main.yml -i ansible/inventory/beta -l mail +``` + +# Terraform Backup + +In addition to the Ansible inventory files the [`ansible/terraform.py`](/ansible/terraform.py) script also stores the last seen Terraform inventory under `.terraform/terraform.tfstate.backup'. + +So if ever Consul KV store is lost, it can be recovered from this copy. + +# Details + +For more details on how Ansible and Terraform interact read [this article](https://github.com/status-im/infra-docs/blob/master/articles/ansible_terraform.md).