ansible/playbooks/death_to_postfix.yml
Ryan Lerch 462176464b ansiblelint fixes-- fqcn[action-core] - command to ansible.builtin.command
Replaces many references to  command: with ansible.builtin.command

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-15 11:26:47 +10:00

22 lines
781 B
YAML

# requires --extra-vars="target='host1:host2:group'"
# thanks threebean on this.
---
- name: Kills postfix which has been left around alive after update.
hosts: "{{ target }}"
user: root
tasks:
- name: Try to stop postfix cleanly.
service: name=postfix state=stopped
# This doesn't really remove the pid file.. but we say it does so ansible only runs it if the pid file is there..
- name: Really kill postfix master process
ansible.builtin.command: pkill -u root master removes=/var/spool/postfix/pid/master.pid
- name: Clean up old pid lock file.
ansible.builtin.command: rm /var/spool/postfix/pid/master.pid removes=/var/spool/postfix/pid/master.pid
- name: Try to start postfix cleanly
service: name=postfix state=started