Browse Source

Fix tripleo_network config conditional

The conditional used in the NetworkConfig block always
evaluates to conclude that network config should be
applied.

Use | int filter on the slurped os-net-config return
code file so that the condition does not always evaluate
to False.

Conflicts:
  tripleo_ansible/roles/tripleo_network_config/molecule/default/molecule.yml
  tripleo_ansible/roles/tripleo_network_config/molecule/default/prepare.yml
  tripleo_ansible/roles/tripleo_network_config/molecule/default/converge.yml

The original patch also fixed molecule tests, this part has been removed
in the cherry-pick.

Closes-Bug: #1918372
Change-Id: Ia4d663cd298556c8143eab6e799e68c81bc8235e
(cherry picked from commit c2aeccc01c)
changes/33/792033/3
Harald Jensås 3 months ago
parent
commit
2979a005c9
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      tripleo_ansible/roles/tripleo-network-config/tasks/main.yml

+ 1
- 1
tripleo_ansible/roles/tripleo-network-config/tasks/main.yml View File

@ -106,5 +106,5 @@
- (tripleo_network_config_action == "CREATE") or
("UPDATE" in tripleo_network_config_network_deployment_actions) or
(os_net_config_returncode_stat.stat.exists and
((os_net_config_returncode_slurp.content | b64decode) != 0)) or
((os_net_config_returncode_slurp.content | b64decode | int) != 0)) or
(not os_net_config_returncode_stat.stat.exists)

Loading…
Cancel
Save