Execution
Date 20 Mar 2026 09:02:32 +0000
Duration 00:00:22.16
Controller ssh-gw-4.layershift.com
User root
Versions
Ansible 2.16.13
ara 1.7.4 / 1.7.4
Python 3.10.10
Summary
25 Hosts
2 Tasks
50 Results
1 Plays
1 Files
0 Records

Task result details

  • Status
    OK
  • Duration
    00:00:08.63
  • Play
    Playbook to install postmark and postfix
  • Task
    Remove postfix and sendmail
  • Host
    sin2

Field Value
changed
False
cmd
set -o pipefail
dnf -y remove postfix sendmail
rm -rf /etc/postfix/
dnf -y install postfix cyrus-sasl-plain s-nail
echo -e "\n#Sending all emails through postmark" >> /etc/postfix/main.cf
echo "relayhost = [smtp.postmarkapp.com]:587" >> /etc/postfix/main.cf
echo "smtp_sasl_auth_enable = yes" >> /etc/postfix/main.cf
echo "smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd" >> /etc/postfix/main.cf
echo "smtp_sasl_security_options = noanonymous" >> /etc/postfix/main.cf
echo "smtp_tls_security_level = may" >> /etc/postfix/main.cf
echo "smtp_tls_loglevel = 1" >> /etc/postfix/main.cf
echo "smtp_always_send_ehlo = yes" >> /etc/postfix/main.cf
echo "[smtp.postmarkapp.com]:587 PM-T-mdmonitor-VLXylaXkYUznVO0nZVOX1:0ZnmCrZdSdpJGPGqoyQ2jukwGTrcyUb8Q5KI" > /etc/postfix/sasl_passwd
echo "#end postmark" >> /etc/postfix/main.cf
chmod 600 /etc/postfix/sasl_passwd
postmap /etc/postfix/sasl_passwd
systemctl enable --now postfix.service
systemctl --no-pager status postfix.service
delta
0:00:05.613370
end
2026-03-20 09:02:49.832128
invocation
{
    "module_args": {
        "_raw_params": "set -o pipefail\ndnf -y remove postfix sendmail\nrm -rf /etc/postfix/\ndnf -y install postfix cyrus-sasl-plain s-nail\necho -e \"\\n#Sending all emails through postmark\" >> /etc/postfix/main.cf\necho \"relayhost = [smtp.postmarkapp.com]:587\" >> /etc/postfix/main.cf\necho \"smtp_sasl_auth_enable = yes\" >> /etc/postfix/main.cf\necho \"smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd\" >> /etc/postfix/main.cf\necho \"smtp_sasl_security_options = noanonymous\" >> /etc/postfix/main.cf\necho \"smtp_tls_security_level = may\" >> /etc/postfix/main.cf\necho \"smtp_tls_loglevel = 1\" >> /etc/postfix/main.cf\necho \"smtp_always_send_ehlo = yes\" >> /etc/postfix/main.cf\necho \"[smtp.postmarkapp.com]:587 PM-T-mdmonitor-VLXylaXkYUznVO0nZVOX1:0ZnmCrZdSdpJGPGqoyQ2jukwGTrcyUb8Q5KI\" > /etc/postfix/sasl_passwd\necho \"#end postmark\" >> /etc/postfix/main.cf\nchmod 600 /etc/postfix/sasl_passwd\npostmap /etc/postfix/sasl_passwd\nsystemctl enable --now postfix.service\nsystemctl --no-pager status postfix.service\n",
        "_uses_shell": true,
        "argv": null,
        "chdir": null,
        "creates": null,
        "executable": "/bin/bash",
        "expand_argument_vars": true,
        "removes": null,
        "stdin": null,
        "stdin_add_newline": true,
        "strip_empty_ends": true
    }
}
msg

rc
0
start
2026-03-20 09:02:44.218758
stderr
Created symlink /etc/systemd/system/multi-user.target.wants/postfix.service → /usr/lib/systemd/system/postfix.service.
stderr_lines
[
    "Created symlink /etc/systemd/system/multi-user.target.wants/postfix.service \u2192 /usr/lib/systemd/system/postfix.service."
]
stdout
No match for argument: sendmail
Dependencies resolved.
================================================================================
 Package         Architecture   Version                Repository          Size
================================================================================
Removing:
 postfix         x86_64         2:3.5.25-1.el9         @appstream         4.4 M

Transaction Summary
================================================================================
Remove  1 Package

Freed space: 4.4 M
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1 
  Running scriptlet: postfix-2:3.5.25-1.el9.x86_64                          1/1 
  Erasing          : postfix-2:3.5.25-1.el9.x86_64                          1/1 
  Running scriptlet: postfix-2:3.5.25-1.el9.x86_64                          1/1 
  Verifying        : postfix-2:3.5.25-1.el9.x86_64                          1/1 

Removed:
  postfix-2:3.5.25-1.el9.x86_64                                                 

Complete!
Last metadata expiration check: 0:19:51 ago on Fri Mar 20 08:42:53 2026.
Package s-nail-14.9.22-9.el9_7.x86_64 is already installed.
Dependencies resolved.
================================================================================
 Package                Arch        Version                Repository      Size
================================================================================
Installing:
 cyrus-sasl-plain       x86_64      2.1.27-22.el9          baseos          21 k
 postfix                x86_64      2:3.5.25-1.el9         appstream      1.5 M
Upgrading:
 cyrus-sasl             x86_64      2.1.27-22.el9          baseos          69 k
 cyrus-sasl-gssapi      x86_64      2.1.27-22.el9          baseos          24 k
 cyrus-sasl-lib         x86_64      2.1.27-22.el9          baseos         762 k

Transaction Summary
================================================================================
Install  2 Packages
Upgrade  3 Packages

Total download size: 2.3 M
Downloading Packages:
(1/5): cyrus-sasl-plain-2.1.27-22.el9.x86_64.rp 487 kB/s |  21 kB     00:00    
(2/5): cyrus-sasl-2.1.27-22.el9.x86_64.rpm      1.4 MB/s |  69 kB     00:00    
(3/5): cyrus-sasl-gssapi-2.1.27-22.el9.x86_64.r 4.7 MB/s |  24 kB     00:00    
(4/5): postfix-3.5.25-1.el9.x86_64.rpm           19 MB/s | 1.5 MB     00:00    
(5/5): cyrus-sasl-lib-2.1.27-22.el9.x86_64.rpm   19 MB/s | 762 kB     00:00    
--------------------------------------------------------------------------------
Total                                           1.5 MB/s | 2.3 MB     00:01     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1 
  Upgrading        : cyrus-sasl-lib-2.1.27-22.el9.x86_64                    1/8 
  Running scriptlet: postfix-2:3.5.25-1.el9.x86_64                          2/8 
  Installing       : postfix-2:3.5.25-1.el9.x86_64                          2/8 
  Running scriptlet: postfix-2:3.5.25-1.el9.x86_64                          2/8 
  Installing       : cyrus-sasl-plain-2.1.27-22.el9.x86_64                  3/8 
  Running scriptlet: cyrus-sasl-2.1.27-22.el9.x86_64                        4/8 
  Upgrading        : cyrus-sasl-2.1.27-22.el9.x86_64                        4/8 
  Running scriptlet: cyrus-sasl-2.1.27-22.el9.x86_64                        4/8 
  Upgrading        : cyrus-sasl-gssapi-2.1.27-22.el9.x86_64                 5/8 
  Running scriptlet: cyrus-sasl-2.1.27-21.el9.x86_64                        6/8 
  Cleanup          : cyrus-sasl-2.1.27-21.el9.x86_64                        6/8 
  Running scriptlet: cyrus-sasl-2.1.27-21.el9.x86_64                        6/8 
  Cleanup          : cyrus-sasl-gssapi-2.1.27-21.el9.x86_64                 7/8 
  Cleanup          : cyrus-sasl-lib-2.1.27-21.el9.x86_64                    8/8 
  Running scriptlet: cyrus-sasl-lib-2.1.27-21.el9.x86_64                    8/8 
  Verifying        : postfix-2:3.5.25-1.el9.x86_64                          1/8 
  Verifying        : cyrus-sasl-plain-2.1.27-22.el9.x86_64                  2/8 
  Verifying        : cyrus-sasl-2.1.27-22.el9.x86_64                        3/8 
  Verifying        : cyrus-sasl-2.1.27-21.el9.x86_64                        4/8 
  Verifying        : cyrus-sasl-gssapi-2.1.27-22.el9.x86_64                 5/8 
  Verifying        : cyrus-sasl-gssapi-2.1.27-21.el9.x86_64                 6/8 
  Verifying        : cyrus-sasl-lib-2.1.27-22.el9.x86_64                    7/8 
  Verifying        : cyrus-sasl-lib-2.1.27-21.el9.x86_64                    8/8 

Upgraded:
  cyrus-sasl-2.1.27-22.el9.x86_64       cyrus-sasl-gssapi-2.1.27-22.el9.x86_64  
  cyrus-sasl-lib-2.1.27-22.el9.x86_64  
Installed:
  cyrus-sasl-plain-2.1.27-22.el9.x86_64      postfix-2:3.5.25-1.el9.x86_64     

Complete!
● postfix.service - Postfix Mail Transport Agent
     Loaded: loaded (/usr/lib/systemd/system/postfix.service; enabled; preset: disabled)
     Active: active (running) since Fri 2026-03-20 09:02:49 UTC; 6ms ago
    Process: 3191768 ExecStartPre=/usr/sbin/restorecon -R /var/spool/postfix/pid (code=exited, status=0/SUCCESS)
    Process: 3191772 ExecStartPre=/usr/libexec/postfix/aliasesdb (code=exited, status=0/SUCCESS)
    Process: 3191779 ExecStartPre=/usr/libexec/postfix/chroot-update (code=exited, status=0/SUCCESS)
    Process: 3191783 ExecStart=/usr/sbin/postfix start (code=exited, status=0/SUCCESS)
   Main PID: 3191851 (master)
      Tasks: 3 (limit: 815319)
     Memory: 7.2M
        CPU: 191ms
     CGroup: /system.slice/postfix.service
             ├─3191851 /usr/libexec/postfix/master -w
             ├─3191852 pickup -l -t unix -u
             └─3191853 qmgr -l -t unix -u

Mar 20 09:02:49 kvm2.sin1.layershift.com systemd[1]: Starting Postfix Mail Transport Agent...
Mar 20 09:02:49 kvm2.sin1.layershift.com postfix/master[3191851]: daemon started -- version 3.5.25, configuration /etc/postfix
Mar 20 09:02:49 kvm2.sin1.layershift.com systemd[1]: Started Postfix Mail Transport Agent.
stdout_lines
[
    "No match for argument: sendmail",
    "Dependencies resolved.",
    "================================================================================",
    " Package         Architecture   Version                Repository          Size",
    "================================================================================",
    "Removing:",
    " postfix         x86_64         2:3.5.25-1.el9         @appstream         4.4 M",
    "",
    "Transaction Summary",
    "================================================================================",
    "Remove  1 Package",
    "",
    "Freed space: 4.4 M",
    "Running transaction check",
    "Transaction check succeeded.",
    "Running transaction test",
    "Transaction test succeeded.",
    "Running transaction",
    "  Preparing        :                                                        1/1 ",
    "  Running scriptlet: postfix-2:3.5.25-1.el9.x86_64                          1/1 ",
    "  Erasing          : postfix-2:3.5.25-1.el9.x86_64                          1/1 ",
    "  Running scriptlet: postfix-2:3.5.25-1.el9.x86_64                          1/1 ",
    "  Verifying        : postfix-2:3.5.25-1.el9.x86_64                          1/1 ",
    "",
    "Removed:",
    "  postfix-2:3.5.25-1.el9.x86_64                                                 ",
    "",
    "Complete!",
    "Last metadata expiration check: 0:19:51 ago on Fri Mar 20 08:42:53 2026.",
    "Package s-nail-14.9.22-9.el9_7.x86_64 is already installed.",
    "Dependencies resolved.",
    "================================================================================",
    " Package                Arch        Version                Repository      Size",
    "================================================================================",
    "Installing:",
    " cyrus-sasl-plain       x86_64      2.1.27-22.el9          baseos          21 k",
    " postfix                x86_64      2:3.5.25-1.el9         appstream      1.5 M",
    "Upgrading:",
    " cyrus-sasl             x86_64      2.1.27-22.el9          baseos          69 k",
    " cyrus-sasl-gssapi      x86_64      2.1.27-22.el9          baseos          24 k",
    " cyrus-sasl-lib         x86_64      2.1.27-22.el9          baseos         762 k",
    "",
    "Transaction Summary",
    "================================================================================",
    "Install  2 Packages",
    "Upgrade  3 Packages",
    "",
    "Total download size: 2.3 M",
    "Downloading Packages:",
    "(1/5): cyrus-sasl-plain-2.1.27-22.el9.x86_64.rp 487 kB/s |  21 kB     00:00    ",
    "(2/5): cyrus-sasl-2.1.27-22.el9.x86_64.rpm      1.4 MB/s |  69 kB     00:00    ",
    "(3/5): cyrus-sasl-gssapi-2.1.27-22.el9.x86_64.r 4.7 MB/s |  24 kB     00:00    ",
    "(4/5): postfix-3.5.25-1.el9.x86_64.rpm           19 MB/s | 1.5 MB     00:00    ",
    "(5/5): cyrus-sasl-lib-2.1.27-22.el9.x86_64.rpm   19 MB/s | 762 kB     00:00    ",
    "--------------------------------------------------------------------------------",
    "Total                                           1.5 MB/s | 2.3 MB     00:01     ",
    "Running transaction check",
    "Transaction check succeeded.",
    "Running transaction test",
    "Transaction test succeeded.",
    "Running transaction",
    "  Preparing        :                                                        1/1 ",
    "  Upgrading        : cyrus-sasl-lib-2.1.27-22.el9.x86_64                    1/8 ",
    "  Running scriptlet: postfix-2:3.5.25-1.el9.x86_64                          2/8 ",
    "  Installing       : postfix-2:3.5.25-1.el9.x86_64                          2/8 ",
    "  Running scriptlet: postfix-2:3.5.25-1.el9.x86_64                          2/8 ",
    "  Installing       : cyrus-sasl-plain-2.1.27-22.el9.x86_64                  3/8 ",
    "  Running scriptlet: cyrus-sasl-2.1.27-22.el9.x86_64                        4/8 ",
    "  Upgrading        : cyrus-sasl-2.1.27-22.el9.x86_64                        4/8 ",
    "  Running scriptlet: cyrus-sasl-2.1.27-22.el9.x86_64                        4/8 ",
    "  Upgrading        : cyrus-sasl-gssapi-2.1.27-22.el9.x86_64                 5/8 ",
    "  Running scriptlet: cyrus-sasl-2.1.27-21.el9.x86_64                        6/8 ",
    "  Cleanup          : cyrus-sasl-2.1.27-21.el9.x86_64                        6/8 ",
    "  Running scriptlet: cyrus-sasl-2.1.27-21.el9.x86_64                        6/8 ",
    "  Cleanup          : cyrus-sasl-gssapi-2.1.27-21.el9.x86_64                 7/8 ",
    "  Cleanup          : cyrus-sasl-lib-2.1.27-21.el9.x86_64                    8/8 ",
    "  Running scriptlet: cyrus-sasl-lib-2.1.27-21.el9.x86_64                    8/8 ",
    "  Verifying        : postfix-2:3.5.25-1.el9.x86_64                          1/8 ",
    "  Verifying        : cyrus-sasl-plain-2.1.27-22.el9.x86_64                  2/8 ",
    "  Verifying        : cyrus-sasl-2.1.27-22.el9.x86_64                        3/8 ",
    "  Verifying        : cyrus-sasl-2.1.27-21.el9.x86_64                        4/8 ",
    "  Verifying        : cyrus-sasl-gssapi-2.1.27-22.el9.x86_64                 5/8 ",
    "  Verifying        : cyrus-sasl-gssapi-2.1.27-21.el9.x86_64                 6/8 ",
    "  Verifying        : cyrus-sasl-lib-2.1.27-22.el9.x86_64                    7/8 ",
    "  Verifying        : cyrus-sasl-lib-2.1.27-21.el9.x86_64                    8/8 ",
    "",
    "Upgraded:",
    "  cyrus-sasl-2.1.27-22.el9.x86_64       cyrus-sasl-gssapi-2.1.27-22.el9.x86_64  ",
    "  cyrus-sasl-lib-2.1.27-22.el9.x86_64  ",
    "Installed:",
    "  cyrus-sasl-plain-2.1.27-22.el9.x86_64      postfix-2:3.5.25-1.el9.x86_64     ",
    "",
    "Complete!",
    "\u25cf postfix.service - Postfix Mail Transport Agent",
    "     Loaded: loaded (/usr/lib/systemd/system/postfix.service; enabled; preset: disabled)",
    "     Active: active (running) since Fri 2026-03-20 09:02:49 UTC; 6ms ago",
    "    Process: 3191768 ExecStartPre=/usr/sbin/restorecon -R /var/spool/postfix/pid (code=exited, status=0/SUCCESS)",
    "    Process: 3191772 ExecStartPre=/usr/libexec/postfix/aliasesdb (code=exited, status=0/SUCCESS)",
    "    Process: 3191779 ExecStartPre=/usr/libexec/postfix/chroot-update (code=exited, status=0/SUCCESS)",
    "    Process: 3191783 ExecStart=/usr/sbin/postfix start (code=exited, status=0/SUCCESS)",
    "   Main PID: 3191851 (master)",
    "      Tasks: 3 (limit: 815319)",
    "     Memory: 7.2M",
    "        CPU: 191ms",
    "     CGroup: /system.slice/postfix.service",
    "             \u251c\u25003191851 /usr/libexec/postfix/master -w",
    "             \u251c\u25003191852 pickup -l -t unix -u",
    "             \u2514\u25003191853 qmgr -l -t unix -u",
    "",
    "Mar 20 09:02:49 kvm2.sin1.layershift.com systemd[1]: Starting Postfix Mail Transport Agent...",
    "Mar 20 09:02:49 kvm2.sin1.layershift.com postfix/master[3191851]: daemon started -- version 3.5.25, configuration /etc/postfix",
    "Mar 20 09:02:49 kvm2.sin1.layershift.com systemd[1]: Started Postfix Mail Transport Agent."
]