--- - name: download MTA get_url: url: https://git.hmp.today/pavel.muhortov/utils/raw/branch/master/sendmail.py dest: /usr/local/bin/sendmail.py mode: u=rwx,g=rx,o=rx - name: create config for MTA template: src: templates/sendmail.config dest: /usr/local/bin/sendmail.config - name: create config for Telegram template: src: templates/sendtelegram.config dest: /usr/local/bin/sendtelegram.config - name: check if Zimbra is installed package_facts: manager: "auto" - name: "'zimbra-core' check result" debug: msg: "'zimbra-core' found, logon-scripts will not copy" when: "'zimbra-core' in ansible_facts.packages" - name: copy E-Mail logon script template: src: templates/sendmail-login.sh dest: /etc/profile.d/sendmail-login.sh mode: u=rwx,g=rx,o=rx when: "'zimbra-core' not in ansible_facts.packages" - name: copy Telegram logon script template: src: templates/sendtelegram-login.sh dest: /etc/profile.d/sendtelegram-login.sh mode: u=rwx,g=rx,o=rx when: "'zimbra-core' not in ansible_facts.packages"