forked from infra/ansible
[postfix] Fix ansible-lint issues
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
This commit is contained in:
parent
4908d2b2d7
commit
01db5bb986
1 changed files with 27 additions and 11 deletions
|
|
@ -7,31 +7,47 @@
|
|||
- "{{ if_uuid.stdout_lines }}"
|
||||
|
||||
- name: Restart iptables
|
||||
service: name=iptables state=restarted
|
||||
ansible.builtin.service:
|
||||
name: iptables
|
||||
state: restarted
|
||||
|
||||
- name: Restart nftables
|
||||
service: name=nftables state=restarted
|
||||
ansible.builtin.service:
|
||||
name: nftables
|
||||
state: restarted
|
||||
|
||||
- name: Restart ip6tables
|
||||
service: name=ip6tables state=restarted
|
||||
ansible.builtin.service:
|
||||
name: ip6tables
|
||||
state: restarted
|
||||
|
||||
- name: Restart NetworkManager
|
||||
service: name=NetworkManager state=restarted
|
||||
ansible.builtin.service:
|
||||
name: NetworkManager
|
||||
state: restarted
|
||||
|
||||
- name: Reload NetworkManager-connections
|
||||
ansible.builtin.command: nmcli c reload
|
||||
|
||||
- name: Restart postfix
|
||||
service: name=postfix state=restarted
|
||||
ansible.builtin.service:
|
||||
name: postfix
|
||||
state: restarted
|
||||
|
||||
- name: Restart rsyslog
|
||||
service: name=rsyslog state=restarted
|
||||
ansible.builtin.service:
|
||||
name: rsyslog
|
||||
state: restarted
|
||||
|
||||
- name: Restart watchdog
|
||||
service: name=watchdog state=restarted
|
||||
ansible.builtin.service:
|
||||
name: watchdog
|
||||
state: restarted
|
||||
|
||||
- name: Reload libvirtd
|
||||
service: name=libvirtd state=reloaded
|
||||
ansible.builtin.service:
|
||||
name: libvirtd
|
||||
state: reloaded
|
||||
ignore_errors: true
|
||||
when: ansible_virtualization_role == 'host'
|
||||
|
||||
|
|
@ -43,14 +59,14 @@
|
|||
register: maincf_content
|
||||
|
||||
- name: Find all the lmdb files
|
||||
set_fact:
|
||||
ansible.builtin.set_fact:
|
||||
lmdb_files: "{{ (maincf.content | b64decode) | regex_findall('lmdb:(.*)') }}"
|
||||
|
||||
- name: Convert /etc/alises to lmdb
|
||||
ansible.builtin.command: "postalias lmdb:{{ item }}"
|
||||
args:
|
||||
creates: "{{ item }}"
|
||||
when: "{{ item }} == /etc/aliases"
|
||||
when: "item == /etc/aliases"
|
||||
loop: "{{ lmdb_files }}"
|
||||
register: result
|
||||
failed_when: result.rc != 0
|
||||
|
|
@ -59,7 +75,7 @@
|
|||
ansible.builtin.command: "postmap lmdb:{{ item }}"
|
||||
args:
|
||||
creates: "{{ item }}"
|
||||
when: "{{ item }} != /etc/aliases"
|
||||
when: "item != /etc/aliases"
|
||||
loop: "{{ lmdb_files }}"
|
||||
register: result
|
||||
failed_when: result.rc != 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue