38 lines
1.1 KiB
YAML
38 lines
1.1 KiB
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'] or
|
|
hostname in groups['mcservers']
|
|
|
|
- name: Include role 'apps'
|
|
ansible.builtin.include_role:
|
|
name: apps
|
|
when: hostname in groups['appservers'] or
|
|
hostname in groups['publicservers'] or
|
|
hostname in groups['mcservers']
|
|
|
|
- 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']
|