--- # Основной playbook для универсальной лаборатории # Автор: Сергей Антропов # Сайт: https://devops.org.ru - name: Base deps hosts: all become: true tasks: - name: Update apt cache (Debian) apt: update_cache: true when: ansible_os_family == 'Debian' changed_when: false - name: Update yum cache (RHEL) yum: update_cache: true when: ansible_os_family == 'RedHat' changed_when: false - name: Common tools package: name: - curl - jq - ca-certificates - iproute2 - iputils-ping - procps - net-tools - sudo - vim - wget - unzip state: present # Развертывание инфраструктуры через роль deploy - name: Deploy infrastructure hosts: all become: true roles: - role: deploy vars: deploy_enabled: true etcd_enabled: "{{ 'etcd' in group_names }}" patroni_enabled: "{{ 'patroni' in group_names }}" haproxy_enabled: "{{ 'haproxy' in group_names }}" apps_enabled: "{{ 'apps' in group_names }}"