We make sure to run upgrade and run os-net-config on its own. Running
os-net-config with the no-activate option will
- prevent the restart of the interface
- adjust the network files to the expected configuration so that next
run won't restart the network.
Eventually at next reboot the change will be taken into account.
Currently we have no change that are required to be taken live during
the upgrade so it safe to ignore the new parameters.
Closes-Bug: #
1721073
Change-Id: I51464274d5dff8a267992ae303ac3517b78d08fb
(cherry picked from commit
5aab25bb68f62b0d7e4ffdc20d4f4da1d82a76db)
fail: msg="rpm-python package was not present before this run! Check environment before re-running"
when: rpm_python_check.changed != false
tags: step0
+ - block:
+ - name: Upgrade os-net-config
+ yum: name=os-net-config state=latest
+ - name: take new os-net-config parameters into account now
+ 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
+ tags: step3
- name: Update all packages
tags: step3
yum: name=* state=latest