{"id":7630,"sha1":"ea555947486183e52121dfb14da9d7f7e90a3bf2","playbook":{"id":5472,"items":{"plays":1,"tasks":2,"results":2,"hosts":1,"files":1,"records":0},"arguments":{"version":null,"verbosity":2,"private_key_file":"/home/ssh-gateway/.ssh/id_rsa","remote_user":"root","connection":"ssh","timeout":null,"ssh_common_args":null,"sftp_extra_args":null,"scp_extra_args":null,"ssh_extra_args":null,"ask_pass":false,"connection_password_file":null,"force_handlers":false,"flush_cache":false,"become":false,"become_method":"sudo","become_user":null,"become_ask_pass":false,"become_password_file":null,"tags":["all"],"skip_tags":[],"check":false,"diff":false,"inventory":["/home/ssh-gateway/ansible/kuly/hosts-jelastic"],"listhosts":false,"subset":"hna11.j.layershift.co.uk","extra_vars":"Not saved by ARA as configured by 'ignored_arguments'","vault_ids":[],"ask_vault_pass":false,"vault_password_files":[],"forks":20,"module_path":null,"syntax":false,"listtasks":false,"listtags":false,"step":false,"start_at_task":null,"args":["RM10331-deploy_postmark_postfix.yaml"]},"labels":[{"id":1,"name":"remote_user:root"},{"id":2,"name":"check:False"},{"id":3,"name":"tags:all"},{"id":284,"name":"subset:hna11.j.layershift.co.uk"}],"started":"2026-04-17T11:47:27.598287+01:00","ended":"2026-04-17T11:47:39.693915+01:00","duration":"00:00:12.095628","name":null,"ansible_version":"2.16.13","client_version":"1.7.5","python_version":"3.10.10","server_version":"1.7.5","status":"completed","path":"/home/ssh-gateway/ansible/kuly/RM10331-deploy_postmark_postfix.yaml","controller":"ssh-gw-4.layershift.com","user":"root"},"content":"---\n- name: Playbook to install postmark and postfix\n  hosts: all\n  gather_facts: false\n  tasks:\n    - name: Remove postfix and sendmail\n      tags: redeploy\n      ansible.builtin.shell: |\n        set -o pipefail\n        yum -y remove postfix sendmail\n        rm -rf /etc/postfix/\n        yum -y install postfix cyrus-sasl-plain s-nail\n        echo -e \"\\n#Sending all emails through postmark\" >> /etc/postfix/main.cf\n        echo \"relayhost = [smtp.postmarkapp.com]:587\" >> /etc/postfix/main.cf\n        echo \"smtp_sasl_auth_enable = yes\" >> /etc/postfix/main.cf\n        echo \"smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd\" >> /etc/postfix/main.cf\n        echo \"smtp_sasl_security_options = noanonymous\" >> /etc/postfix/main.cf\n        echo \"smtp_tls_security_level = may\" >> /etc/postfix/main.cf\n        echo \"smtp_tls_loglevel = 1\" >> /etc/postfix/main.cf\n        echo \"smtp_always_send_ehlo = yes\" >> /etc/postfix/main.cf\n        echo \"[smtp.postmarkapp.com]:587 PM-T-mdmonitor-VLXylaXkYUznVO0nZVOX1:0ZnmCrZdSdpJGPGqoyQ2jukwGTrcyUb8Q5KI\" > /etc/postfix/sasl_passwd\n        echo \"#end postmark\" >> /etc/postfix/main.cf\n        chmod 600 /etc/postfix/sasl_passwd\n        postmap /etc/postfix/sasl_passwd\n        systemctl enable --now postfix.service\n        systemctl --no-pager status postfix.service\n      args:\n        executable: /bin/bash\n      changed_when: false\n    - name: Set email alias for user root\n      tags: newaliases\n      ansible.builtin.shell: |\n        set -o pipefail\n        sed -i '/root:/d' /etc/aliases\n        echo \"root:           opsmonitor@layershift.com\" >> /etc/aliases\n        newaliases\n        systemctl restart postfix.service\n        systemctl --no-pager status postfix.service\n      args:\n        executable: /bin/bash\n      changed_when: false\n","created":"2026-04-17T11:47:27.615043+01:00","updated":"2026-04-17T11:47:27.615064+01:00","path":"/home/ssh-gateway/ansible/kuly/RM10331-deploy_postmark_postfix.yaml"}