Improve docker API version retrieval

The current method does not work due to CLI output formatting
changes. We improve it to render the client output using toml,
which should be more future proof.

This change also disables pinging of the neutron router during
tempest tests, a combined patch is required to pass tests.

Change-Id: I7f611ffd095ca690baba3a987d8eb0b8407fade1
This commit is contained in:
Jesse Pretorius 2019-01-21 16:45:35 +00:00 committed by Jonathan Rosser
parent 30256ebb6b
commit 7175ef6ae6
2 changed files with 7 additions and 2 deletions

View File

@ -16,14 +16,17 @@
- name: Define the docker api
block:
- name: Get docker api version
command: "docker version"
command: >-
{% raw %}
docker version -f "{{.Client.APIVersion }}"
{% endraw %}
failed_when: false
changed_when: false
register: docker_version
- name: Set docker api version fact
set_fact:
zun_docker_api_version: "{{ (docker_version.stdout | from_yaml)['Client']['API version'] }}"
zun_docker_api_version: "{{ docker_version.stdout | trim }}"
when:
- zun_services['zun-compute']['group'] in group_names

View File

@ -13,6 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
tempest_network_ping_gateway: False
container_networks:
management_address:
address: "{{ ansible_host }}"