add readme for inventory

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2020-04-02 17:42:05 +02:00
parent 8a7483efee
commit b51739e6cb
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
1 changed files with 24 additions and 0 deletions

View File

@ -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).