diff options
Diffstat (limited to 'ansible/README.md')
| -rw-r--r-- | ansible/README.md | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/ansible/README.md b/ansible/README.md index f693916..4c67f24 100644 --- a/ansible/README.md +++ b/ansible/README.md @@ -37,26 +37,26 @@ git checkout group_vars/all/vault.example ``` 1. View/edit your encrypted vault: ```bash -ansible-vault view/edit --vault-id vaultkey group_vars/all/vault +ansible-vault view/edit group_vars/all/vault ``` -1. (FTO) Run the `init.yaml` playbook to install a service +1. (FTO) Run the `init.yaml` playbook with a `limit` to install a service ```bash -ansible-playbook -u youruser -i hosts --vault-id vaultkey playbooks/init.yaml --tags=[app name] +ansible-playbook playbooks/init.yaml --limit=[app name] --tags=install ``` -1. Use another playbook to modify a service (not yet implemented but planned) +1. Use another playbook to modify a service ```bash -ansible-playbook -u youruser -i hosts --vault-id vaultkey playbooks/... --tags=[...] +ansible-playbook playbooks/... --limit=[app name] --tags=config ``` # Ansible Roles You can think of each Role being an "app". Each Role has a `setup.yaml` task file responsible for installing the app. -It may or may not have other task files depending on what other functionality this Role -supports for this app. +It may or may not have other task files (eg. `config.yaml`) depending on what other +functionality this Role supports for this app. The `main.yaml` file in the Role determines the flow logic for which task files -are getting run based on Tags for other functionalities (see Tags section below). +are getting run based on Tags. # Artifacts @@ -67,16 +67,3 @@ but it also allows us to use some of this info in other parts of Ansible for cle > Never commit this dir to git. It contains sensitive info! Its already configured to be ignored by git. - - -# Ansible Tags -Setting up the app is normally done using the Role's name as the tag, -i.e. `--tags <role name>`. - -Any subsequent tasks required beyond setting up the app, will have a different -tag associated for those tasks (along with a different playbook to trigger them). -For example, the MinIO Role will support adding a new user+bucket under the tag `add_minio_user`: - -```bash -ansible-playbook ... playbooks/add_user.yaml --tags add_minio_user -``` |
