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

View File

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