Fix OVS detection

Although my shell returns 127 when a command is not found, Ansible's command
module seems to be getting 2. Assume non-zero means not installed.
This commit is contained in:
Mark Goddard 2018-08-30 13:20:12 +00:00
parent e481b97437
commit 64134eabcc

View File

@ -28,10 +28,10 @@
state: running
enabled: true
become: true
# Return code 127 means the command does not exist. Do this check to avoid
# installing Open vSwitch system-wide if the command already exists as a link
# to a containerised version of OVS.
when: ovs_vsctl_check.rc == 127
# Assume a non-zero return code means the command does not exist. Do this
# check to avoid installing Open vSwitch system-wide if the command already
# exists as a link to a containerised version of OVS.
when: ovs_vsctl_check.rc != 0
- name: Configure physical networks
include_tasks: physical_network.yml