Merge "Run os-net-config on step 3"

This commit is contained in:
Zuul 2020-12-02 00:43:21 +00:00 committed by Gerrit Code Review
commit 2a01a2bffc
1 changed files with 16 additions and 0 deletions

View File

@ -81,6 +81,22 @@ outputs:
name: '*'
state: latest
exclude: ansible
- name: Check that os-net-config has configuration
when: step|int == 3
stat:
path: /etc/os-net-config/config.json
get_attributes: false
get_checksum: false
get_mime: false
register: stat_config_json
- name: take new os-net-config parameters into account now
when:
- step|int == 3
- stat_config_json.stat.exists
command: os-net-config --no-activate -c /etc/os-net-config/config.json -v --detailed-exit-codes
register: os_net_config_upgrade
failed_when: os_net_config_upgrade.rc not in [0,2]
changed_when: os_net_config_upgrade.rc == 2
# Keepalived was deprecated and the VIPs are now deployed by
# os-net-config.
# When Keepalived is stopped, it brings down the VIPs which is