mirror of
https://gitlab.archlinux.org/archlinux/infrastructure.git
synced 2025-01-18 08:06:16 +01:00
ansible-lint: address no-changed-when fatal errors
Add "noqa no-changed-when" tags to handlers using the command module. Perhaps it is wrong of ansible-lint to flag these, since handlers are not the best place to have conditional execution.
This commit is contained in:
parent
1507dd48f9
commit
4ae73a93be
@ -1,7 +1,7 @@
|
||||
- name: Restart php-fpm@archwiki
|
||||
service: name=php-fpm@{{ archwiki_user }} state=restarted
|
||||
|
||||
- name: Run wiki updatescript
|
||||
- name: Run wiki updatescript # noqa no-changed-when
|
||||
command: php {{ archwiki_dir }}/public/maintenance/update.php --quick
|
||||
become: true
|
||||
become_user: "{{ archwiki_user }}"
|
||||
@ -14,7 +14,7 @@
|
||||
# otherwise nginx will spit errors into the log until it is restarted (even
|
||||
# reload is not enough).
|
||||
# reference: https://stackoverflow.com/a/6896903
|
||||
- name: Purge nginx cache
|
||||
- name: Purge nginx cache # noqa no-changed-when
|
||||
command: find /var/lib/nginx/cache -type f -delete
|
||||
|
||||
# The MediaWiki file cache can be invalidated by deleting the files in the
|
||||
|
@ -1,7 +1,7 @@
|
||||
- name: Reload dovecot
|
||||
service: name=dovecot state=restarted
|
||||
|
||||
- name: Run sievec
|
||||
- name: Run sievec # noqa no-changed-when
|
||||
command: /usr/bin/sievec /etc/dovecot/sieve/{{ item }}
|
||||
loop:
|
||||
- spam-to-folder.sieve
|
||||
|
@ -3,5 +3,5 @@
|
||||
name: fail2ban
|
||||
state: restarted
|
||||
|
||||
- name: Reload fail2ban jails
|
||||
- name: Reload fail2ban jails # noqa no-changed-when
|
||||
shell: type fail2ban-server > /dev/null && (fail2ban-client ping > /dev/null && fail2ban-client reload > /dev/null || true) || true
|
||||
|
@ -1,2 +1,2 @@
|
||||
- name: Apply sysctl settings
|
||||
- name: Apply sysctl settings # noqa no-changed-when
|
||||
command: sysctl --system
|
||||
|
@ -7,7 +7,7 @@
|
||||
- name: Reload postfix
|
||||
service: name=postfix state=reloaded
|
||||
|
||||
- name: Run postmap
|
||||
- name: Run postmap # noqa no-changed-when
|
||||
command: postmap /etc/postfix/{{ item }}
|
||||
loop:
|
||||
- aliases
|
||||
|
@ -3,10 +3,10 @@
|
||||
name: postfix
|
||||
state: restarted
|
||||
|
||||
- name: Reload postfix
|
||||
- name: Reload postfix # noqa no-changed-when
|
||||
command: postfix reload
|
||||
|
||||
- name: Postmap additional files
|
||||
- name: Postmap additional files # noqa no-changed-when
|
||||
command: postmap /etc/postfix/{{ item }}
|
||||
with_items:
|
||||
- access_client
|
||||
@ -19,5 +19,5 @@
|
||||
- domains
|
||||
- msa_header_checks
|
||||
|
||||
- name: Update aliases db
|
||||
- name: Update aliases db # noqa no-changed-when
|
||||
command: postalias /etc/postfix/aliases
|
||||
|
@ -1,4 +1,4 @@
|
||||
- name: Upgrade database
|
||||
- name: Upgrade database # noqa no-changed-when
|
||||
become: true
|
||||
become_user: security
|
||||
command: /usr/bin/make db-upgrade chdir="{{ security_tracker_dir }}"
|
||||
|
@ -1,10 +1,10 @@
|
||||
# https://github.com/systemd/systemd/issues/9627
|
||||
- name: Delete wg0
|
||||
- name: Delete wg0 # noqa no-changed-when
|
||||
command: networkctl delete wg0
|
||||
register: result
|
||||
failed_when: result.rc not in [0, 1]
|
||||
listen: Reload wireguard
|
||||
|
||||
- name: Reload .network and .netdev files
|
||||
- name: Reload .network and .netdev files # noqa no-changed-when
|
||||
command: networkctl reload
|
||||
listen: Reload wireguard
|
||||
|
Loading…
Reference in New Issue
Block a user