Configure playbook

This commit is contained in:
Sam A. 2024-10-21 23:37:11 +02:00
parent 83d6fb9c31
commit a5316a80a7
Signed by: samsapti
GPG key ID: CBBBE7371E81C4EA
3 changed files with 31 additions and 11 deletions

View file

@ -14,6 +14,7 @@ varsa
folald folald
[virtual:children] [virtual:children]
monitoring
production production
staging staging
control control

View file

@ -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) }}"

View file

@ -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'