--- # Задачи для развертывания HAProxy # Автор: Сергей Антропов # Сайт: https://devops.org.ru - name: HAProxy placeholder debug: msg: "HAProxy группа готова для настройки" - name: Install HAProxy package: name: haproxy state: present - name: Create HAProxy config directory file: path: /etc/haproxy state: directory mode: '0755' - name: Configure HAProxy template: src: haproxy.cfg.j2 dest: /etc/haproxy/haproxy.cfg mode: '0644' notify: restart haproxy - name: Start HAProxy systemd: name: haproxy state: started enabled: true - name: HAProxy status systemd: name: haproxy register: haproxy_status - name: Display HAProxy status debug: msg: "HAProxy service status: {{ haproxy_status.status.ActiveState }}"