Fix E503 Task that run when changed should likely be handlers

Daemon_reload moved to handlers file.
This commit is contained in:
Jeremy Gardais 2019-02-26 17:30:43 +01:00
parent f85fd58bad
commit 9c8c181e70
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
3 changed files with 6 additions and 7 deletions

View File

@ -2,6 +2,7 @@
* Fix E405 Remote package tasks should have a retry. * Fix E405 Remote package tasks should have a retry.
* Fix E303 systemctl used in place of systemd module. * Fix E303 systemctl used in place of systemd module.
* Fix E503 Tasks that run when changed should likely be handlers. Daemon_reload moved to handlers file.
## v2.1.1 ## v2.1.1

View File

@ -7,3 +7,7 @@
enabled: '{{ item.service | d(True) | bool }}' enabled: '{{ item.service | d(True) | bool }}'
with_flattened: with_flattened:
- '{{ flexlm__licences }}' - '{{ flexlm__licences }}'
- name: systemd daemon reload
systemd:
daemon_reload: True

View File

@ -87,17 +87,11 @@
owner: 'root' owner: 'root'
group: 'root' group: 'root'
mode: '0644' mode: '0644'
register: flexlm__register_service
with_flattened: with_flattened:
- '{{ flexlm__licences }}' - '{{ flexlm__licences }}'
when: ( (flexlm__deploy_state == "present") and when: ( (flexlm__deploy_state == "present") and
( item.service | d(True) )) ( item.service | d(True) ))
notify: ['systemd daemon reload', 'restart flexlm services']
- name: Force systemd to reread configs
systemd:
daemon_reload: True
notify: ['restart flexlm services']
when: ( flexlm__register_service|changed )
- name: Manage flexlm services - name: Manage flexlm services
service: service: