nomad/ansible/redbrick-ansible.yml
2023-03-18 13:13:16 +00:00

23 lines
1 KiB
YAML

---
# check local head is the same as remote head
# fail if not
# this is to ensure that the local repository is up to date
# before running the playbook, ignores uncommitted changes
- name: Check local repository is up to date
hosts: localhost
roles:
- { role: git-compare-head } # Prevent execution on out-of-date or divergent branches
- name: Redbrick general management
hosts: all
roles:
#- { role: apt } # update all packages, equivalent to `apt update && apt upgrade`
#- { role: ssh } # add users defined in roles/defaults/main.yml
#- { role: fail2ban } # add and configure fail2ban with jail file located in `templates/fail2ban.jail`
- name: Configure Nomad & Consul
hosts: nomad
roles:
#- { role: hashicorp-apt } # add hashicorp apt repo to apt sources
#- { role: configure-nomad } # install nomad, configure and start the client & server based on `templates/` on nomad group
#- { role: configure-consul } # install consul, configure and start the client & server based on `templates/` on nomad group