Fix fluentd upgrade tasks during FFU.
The upgrade task doesn't check for the service existence which make the upgrade fails during ffu. We're using the set_facts idiom as it persist between steps. Closes-Bug: #1757985 Change-Id: I1d3ccd7d3fb641d187f214c20f1d6a4d6113304a
This commit is contained in:
parent
3e89bd9e5d
commit
f857e21b2d
@ -121,9 +121,22 @@ outputs:
|
||||
path: /var/cache/containers/fluentd
|
||||
state: directory
|
||||
upgrade_tasks:
|
||||
- name: Check if fluent.service is deployed
|
||||
command: systemctl is-enabled --quiet fluentd.service
|
||||
ignore_errors: True
|
||||
register: fluentd_enabled_result
|
||||
when:
|
||||
- step|int == 0
|
||||
- name: Set fact fluentd_enabled
|
||||
set_fact:
|
||||
fluentd_enabled: "{{ fluentd_enabled_result.rc == 0 }}"
|
||||
when:
|
||||
- step|int == 0
|
||||
- name: Stop and disable fluentd service
|
||||
when: step|int == 2
|
||||
service: name=fluentd.service state=stopped enabled=no
|
||||
when:
|
||||
- step|int == 2
|
||||
- fluentd_enabled|bool
|
||||
fast_forward_upgrade_tasks:
|
||||
- name: Check if fluent.service is deployed
|
||||
command: systemctl is-enabled --quiet fluentd.service
|
||||
|
Loading…
Reference in New Issue
Block a user