- name: setup yandexua for debian/ubuntu systems gather_facts: no hosts: servers become: "{{become}}" tasks: - name: check yandexua is installed ansible.builtin.shell: executable: /bin/bash cmd: "[[ -x `which unified_agent` ]]" changed_when: false - name: setup yandexua ansible.builtin.template: src: templates/config.yml.j2 dest: /etc/yandex/unified_agent/config.yml notify: restart yandexua diff: true handlers: - name: restart yandexua ansible.builtin.shell: executable: /bin/bash # warning no custom wrapper for non-systemd systems cmd: "[[ -x /lib/systemd/systemd ]] && systemctl restart unified-agent.service || echo FAIL"