Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ngine-io/ansible-collection-hashi
Hashicorp Ansible Role Collection
https://github.com/ngine-io/ansible-collection-hashi
ansible ansible-collection ansible-collections ansible-roles consul hashicorp hashicorp-consul hashicorp-nomad
Last synced: about 1 month ago
JSON representation
Hashicorp Ansible Role Collection
- Host: GitHub
- URL: https://github.com/ngine-io/ansible-collection-hashi
- Owner: ngine-io
- License: gpl-3.0
- Created: 2020-01-27T09:15:46.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-06-24T12:14:22.000Z (5 months ago)
- Last Synced: 2024-09-30T17:42:38.988Z (about 2 months ago)
- Topics: ansible, ansible-collection, ansible-collections, ansible-roles, consul, hashicorp, hashicorp-consul, hashicorp-nomad
- Language: Jinja
- Homepage: https://galaxy.ansible.com/ui/repo/published/ngine_io/hashi/
- Size: 62.5 KB
- Stars: 8
- Watchers: 0
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ansible Collection - ngine_io.hashi
## Install
```yaml
# file: ./requirements.yml
collections:
- name: [email protected]:ngine-io/ansible-collection-hashi.git
type: git
version: master
```## Example Configuration
NOTE: Configuring the firewalld/iptables is not part of the collection.
### Inventory
```ini
[consul:children]
nomad[nomad:children]
nomad_servers
nomad_clients[nomad_servers]
nomad-server[1:3][nomad_clients]
nomad-client[1:5]
```### Group Vars
#### Vars for nomad
```yaml
# file: ./group_vars/nomad.yml
nomad__use_consul: true
```#### Vars for nomad clients
```yaml
# file: ./group_vars/nomad_clients.yml
---
consul__role: client
nomad__roles:
- client
```#### Vars for nomad servers
```yaml
# file: ./group_vars/nomad_servers.yml
---
consul__role: server
nomad__node_class: server
nomad__roles:
- server
# Optional: also be a client
# - client
```### Playbook
```yaml
# file: ./playbooks/nomad.yml
---
- hosts: nomad_servers- hosts: nomad_servers
serial: 1
roles:
- role: ngine_io.hashi.consul
tags: consul
- role: ngine_io.hashi.nomad
tags: nomad- hosts: nomad_clients
serial:
- 1
- 30%
roles:
# Install docker for docker workloads
# - role: geerlingguy.docker
# tags: docker
- role: ngine_io.hashi.consul
tags: consul
- role: ngine_io.hashi.cni
tags: cni
- role: ngine_io.hashi.nomad
tags: nomad- hosts: nomad_servers[0]
vars:
nomad_job__job_templates:
- name: http-echo
path: http-echo.nomad
- name: traefik
path: traefik.nomad
roles:
- role: ngine_io.hashi.nomad_job
tags: nomad_job
```### Upgrading a Nomad cluster
```yaml
# file: ./playbooks/nomad_upgrade.yml
---
- hosts: nomad_servers
serial: 1
roles:
- role: ngine_io.hashi.nomad_upgrade
tags: nomad- hosts: nomad_clients
serial:
- 1
- 30%
roles:
- role: ngine_io.hashi.nomad_upgrade
tags: nomad
```