ansible/test/integration/targets/docker_config/tasks/main.yml
John Hu 82f1438b14 Add docker_config module (#38792)
* Add docker_config module

* Address review comments

* Merge description lines

* Stop returning empty config_id in results

* Add integration tests for docker_config

Based on docker_secret's tests.

* Ensure swarm using docker_swarm module

* Add minimum docker / docker api version requirements

ref: https://github.com/ansible/ansible/pull/47046

* Check Docker API version before running tests

ref: https://github.com/ansible/ansible/pull/47340

* Typo

* Wording

* Improve example

* Assert state == absent is idempotent
2018-10-26 10:58:17 +01:00

7 lines
332 B
YAML

- name: Check Docker API version
command: "{{ ansible_python.executable }} -c 'import docker; print(docker.from_env().version()[\"ApiVersion\"])'"
register: docker_api_version
ignore_errors: yes
- include_tasks: test_docker_config.yml
when: docker_api_version.rc == 0 and docker_api_version.stdout is version('1.30', '>=')