- name: postinstall syslog setup gather_facts: no hosts: "{{target}}" become: "{{become}}" tasks: - name: define distro vendor ansible.builtin.shell: executable: /bin/bash cmd: "lsb_release -is 2>/dev/null" changed_when: false check_mode: false register: vendor #- debug: msg={{vendor}} - name: install gnu syslogd ansible.builtin.script: cmd: scripts/debian-syslog.bash chdir: /root register: script_output changed_when: >- "changed - all done" in script_output.stdout when: vendor.stdout == 'Debian' or vendor.stdout == 'Ubuntu' - name: display script stdout debug: var=script_output.stdout_lines when: script_output.stdout is defined - name: display script stderr debug: var=script_output.sterr_lines when: script_output.sterr is defined # todo slackware linux