Configure playbook
This commit is contained in:
parent
83d6fb9c31
commit
a5316a80a7
|
@ -14,6 +14,7 @@ varsa
|
|||
folald
|
||||
|
||||
[virtual:children]
|
||||
monitoring
|
||||
production
|
||||
staging
|
||||
control
|
||||
|
|
|
@ -229,4 +229,4 @@ services:
|
|||
services_exclude:
|
||||
- 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
|
||||
# code: language=ansible
|
||||
---
|
||||
- hosts: all
|
||||
- name: Provision all VMs
|
||||
hosts: virtual
|
||||
gather_facts: true
|
||||
become: true
|
||||
roles:
|
||||
- name: vm-common
|
||||
tags: [base_only]
|
||||
# - name: zfs
|
||||
# tags: [zfs]
|
||||
- name: docker
|
||||
tags: [docker]
|
||||
- name: services
|
||||
tags: [services]
|
||||
tasks:
|
||||
- name: Include role 'vm-common'
|
||||
ansible.builtin.include_role:
|
||||
name: vm-common
|
||||
|
||||
- name: Include role 'docker'
|
||||
ansible.builtin.include_role:
|
||||
name: docker
|
||||
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