Merge "Check if snmpd is enabled for upgrade_tasks"
This commit is contained in:
commit
bf8f14448f
@ -89,6 +89,17 @@ outputs:
|
|||||||
step_config: |
|
step_config: |
|
||||||
include ::tripleo::profile::base::snmp
|
include ::tripleo::profile::base::snmp
|
||||||
upgrade_tasks:
|
upgrade_tasks:
|
||||||
|
- when: step|int == 0
|
||||||
|
block:
|
||||||
|
- name: Check if snmpd is enabled
|
||||||
|
command: systemctl is-enabled --quiet snmpd
|
||||||
|
ignore_errors: True
|
||||||
|
register: snmpd_enabled_result
|
||||||
|
- name: Set fact snmpd_enabled
|
||||||
|
set_fact:
|
||||||
|
snmpd_enabled: "{{ snmpd_enabled_result.rc == 0 }}"
|
||||||
- name: Stop snmp service
|
- name: Stop snmp service
|
||||||
when: step|int == 1
|
when:
|
||||||
|
- step|int == 1
|
||||||
|
- snmpd_enabled|bool
|
||||||
service: name=snmpd state=stopped
|
service: name=snmpd state=stopped
|
||||||
|
Loading…
x
Reference in New Issue
Block a user