lab-ansible/site.yml
2024-02-04 16:34:29 +01:00

36 lines
995 B
YAML

# vim: ft=yaml.ansible
# code: language=ansible
---
- name: Run playbook
hosts: virtualservers
become: true
gather_facts: true
tasks:
- name: Include role 'virt-common'
ansible.builtin.include_role:
name: virt-common
when: hostname in groups['virtualservers']
- name: Include role 'docker'
ansible.builtin.include_role:
name: docker
when: hostname in groups['appservers'] or
hostname in groups['proxyservers'] or
hostname in groups['publicservers']
- name: Include role 'apps'
ansible.builtin.include_role:
name: apps
when: hostname in groups['appservers'] or
hostname in groups['publicservers']
- name: Include role 'postgresql'
ansible.builtin.include_role:
name: postgresql
when: hostname in groups['dbservers']
- name: Include role 'proxy'
ansible.builtin.include_role:
name: proxy
when: hostname in groups['proxyservers']