Configure playbook
This commit is contained in:
parent
83d6fb9c31
commit
a5316a80a7
|
@ -14,6 +14,7 @@ varsa
|
||||||
folald
|
folald
|
||||||
|
|
||||||
[virtual:children]
|
[virtual:children]
|
||||||
|
monitoring
|
||||||
production
|
production
|
||||||
staging
|
staging
|
||||||
control
|
control
|
||||||
|
|
|
@ -229,4 +229,4 @@ services:
|
||||||
services_exclude:
|
services_exclude:
|
||||||
- uptime_kuma
|
- uptime_kuma
|
||||||
|
|
||||||
services_include: "{{ services | dict2items | map(attribute='key') | list | community.general.lists_difference(services_exclude) }}"
|
services_include: "{{ services | dict2items | map(attribute='key') | community.general.lists_difference(services_exclude) }}"
|
||||||
|
|
39
site.yml
39
site.yml
|
@ -1,15 +1,34 @@
|
||||||
# vim: ft=yaml.ansible
|
# vim: ft=yaml.ansible
|
||||||
# code: language=ansible
|
# code: language=ansible
|
||||||
---
|
---
|
||||||
- hosts: all
|
- name: Provision all VMs
|
||||||
|
hosts: virtual
|
||||||
gather_facts: true
|
gather_facts: true
|
||||||
become: true
|
become: true
|
||||||
roles:
|
tasks:
|
||||||
- name: vm-common
|
- name: Include role 'vm-common'
|
||||||
tags: [base_only]
|
ansible.builtin.include_role:
|
||||||
# - name: zfs
|
name: vm-common
|
||||||
# tags: [zfs]
|
|
||||||
- name: docker
|
- name: Include role 'docker'
|
||||||
tags: [docker]
|
ansible.builtin.include_role:
|
||||||
- name: services
|
name: docker
|
||||||
tags: [services]
|
when: vm_type == 'app' or
|
||||||
|
vm_type == 'uptime'
|
||||||
|
vm_type == 'runner'
|
||||||
|
|
||||||
|
# - name: Include role 'zfs'
|
||||||
|
# ansible.builtin.include_role:
|
||||||
|
# name: zfs
|
||||||
|
# when: vm_type == 'app'
|
||||||
|
|
||||||
|
- name: Include role 'services'
|
||||||
|
ansible.builtin.include_role:
|
||||||
|
name: services
|
||||||
|
when: vm_type == 'app' or
|
||||||
|
vm_type == 'uptime'
|
||||||
|
|
||||||
|
# - name: Include role 'jumphost'
|
||||||
|
# ansible.builtin.include_role:
|
||||||
|
# name: jumpthost
|
||||||
|
# when: vm_type == 'control'
|
||||||
|
|
Loading…
Reference in a new issue