mirror of
https://github.com/ansible-collections/community.docker.git
synced 2025-12-17 04:18:42 +00:00
Add headers to ci tests (#954)
* CI tests: add note to main.yml * improve
This commit is contained in:
parent
dd91461a1f
commit
9b8c8a8701
@ -1,4 +1,9 @@
|
|||||||
---
|
---
|
||||||
|
####################################################################
|
||||||
|
# WARNING: These are designed specifically for Ansible tests #
|
||||||
|
# and should not be used as examples of how to write Ansible roles #
|
||||||
|
####################################################################
|
||||||
|
|
||||||
- include_tasks: test_docker_config.yml
|
- include_tasks: test_docker_config.yml
|
||||||
when: docker_py_version is version('2.6.0', '>=') and docker_api_version is version('1.30', '>=')
|
when: docker_py_version is version('2.6.0', '>=') and docker_api_version is version('1.30', '>=')
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,9 @@
|
|||||||
---
|
---
|
||||||
|
####################################################################
|
||||||
|
# WARNING: These are designed specifically for Ansible tests #
|
||||||
|
# and should not be used as examples of how to write Ansible roles #
|
||||||
|
####################################################################
|
||||||
|
|
||||||
# Create random name prefix (for containers, networks, ...)
|
# Create random name prefix (for containers, networks, ...)
|
||||||
- name: Create random container name prefix
|
- name: Create random container name prefix
|
||||||
set_fact:
|
set_fact:
|
||||||
|
|||||||
@ -1,4 +1,9 @@
|
|||||||
---
|
---
|
||||||
|
####################################################################
|
||||||
|
# WARNING: These are designed specifically for Ansible tests #
|
||||||
|
# and should not be used as examples of how to write Ansible roles #
|
||||||
|
####################################################################
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- name: Create random container name
|
- name: Create random container name
|
||||||
set_fact:
|
set_fact:
|
||||||
|
|||||||
@ -1,3 +1,8 @@
|
|||||||
|
####################################################################
|
||||||
|
# WARNING: These are designed specifically for Ansible tests #
|
||||||
|
# and should not be used as examples of how to write Ansible roles #
|
||||||
|
####################################################################
|
||||||
|
|
||||||
- include_tasks: test_host_info.yml
|
- include_tasks: test_host_info.yml
|
||||||
when: docker_py_version is version('1.10.0', '>=') and docker_api_version is version('1.21', '>=')
|
when: docker_py_version is version('1.10.0', '>=') and docker_api_version is version('1.21', '>=')
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,8 @@
|
|||||||
|
####################################################################
|
||||||
|
# WARNING: These are designed specifically for Ansible tests #
|
||||||
|
# and should not be used as examples of how to write Ansible roles #
|
||||||
|
####################################################################
|
||||||
|
|
||||||
- when: ansible_facts.distribution ~ ansible_facts.distribution_major_version not in ['CentOS6', 'RedHat6']
|
- when: ansible_facts.distribution ~ ansible_facts.distribution_major_version not in ['CentOS6', 'RedHat6']
|
||||||
include_tasks:
|
include_tasks:
|
||||||
file: test.yml
|
file: test.yml
|
||||||
|
|||||||
@ -1,4 +1,9 @@
|
|||||||
---
|
---
|
||||||
|
####################################################################
|
||||||
|
# WARNING: These are designed specifically for Ansible tests #
|
||||||
|
# and should not be used as examples of how to write Ansible roles #
|
||||||
|
####################################################################
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- name: Make sure image is not there
|
- name: Make sure image is not there
|
||||||
docker_image:
|
docker_image:
|
||||||
|
|||||||
@ -1,3 +1,8 @@
|
|||||||
|
####################################################################
|
||||||
|
# WARNING: These are designed specifically for Ansible tests #
|
||||||
|
# and should not be used as examples of how to write Ansible roles #
|
||||||
|
####################################################################
|
||||||
|
|
||||||
- when: ansible_facts.distribution ~ ansible_facts.distribution_major_version not in ['CentOS6', 'RedHat6']
|
- when: ansible_facts.distribution ~ ansible_facts.distribution_major_version not in ['CentOS6', 'RedHat6']
|
||||||
include_tasks:
|
include_tasks:
|
||||||
file: test.yml
|
file: test.yml
|
||||||
|
|||||||
@ -1,4 +1,9 @@
|
|||||||
---
|
---
|
||||||
|
####################################################################
|
||||||
|
# WARNING: These are designed specifically for Ansible tests #
|
||||||
|
# and should not be used as examples of how to write Ansible roles #
|
||||||
|
####################################################################
|
||||||
|
|
||||||
- name: Create random name prefix
|
- name: Create random name prefix
|
||||||
set_fact:
|
set_fact:
|
||||||
name_prefix: "{{ 'ansible-test-%0x' % ((2**32) | random) }}"
|
name_prefix: "{{ 'ansible-test-%0x' % ((2**32) | random) }}"
|
||||||
|
|||||||
@ -1,4 +1,9 @@
|
|||||||
---
|
---
|
||||||
|
####################################################################
|
||||||
|
# WARNING: These are designed specifically for Ansible tests #
|
||||||
|
# and should not be used as examples of how to write Ansible roles #
|
||||||
|
####################################################################
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- name: Create random network name
|
- name: Create random network name
|
||||||
set_fact:
|
set_fact:
|
||||||
|
|||||||
@ -1,4 +1,9 @@
|
|||||||
---
|
---
|
||||||
|
####################################################################
|
||||||
|
# WARNING: These are designed specifically for Ansible tests #
|
||||||
|
# and should not be used as examples of how to write Ansible roles #
|
||||||
|
####################################################################
|
||||||
|
|
||||||
# Run the tests
|
# Run the tests
|
||||||
- block:
|
- block:
|
||||||
- include_tasks: test_node.yml
|
- include_tasks: test_node.yml
|
||||||
|
|||||||
@ -1,3 +1,8 @@
|
|||||||
|
####################################################################
|
||||||
|
# WARNING: These are designed specifically for Ansible tests #
|
||||||
|
# and should not be used as examples of how to write Ansible roles #
|
||||||
|
####################################################################
|
||||||
|
|
||||||
- include_tasks: test_node_info.yml
|
- include_tasks: test_node_info.yml
|
||||||
# Maximum of 1.24 (docker API version for docker_node_info) and 1.25 (docker API version for docker_swarm) is 1.25
|
# Maximum of 1.24 (docker API version for docker_node_info) and 1.25 (docker API version for docker_swarm) is 1.25
|
||||||
when: docker_py_version is version('2.4.0', '>=') and docker_api_version is version('1.25', '>=')
|
when: docker_py_version is version('2.4.0', '>=') and docker_api_version is version('1.25', '>=')
|
||||||
|
|||||||
@ -1,4 +1,9 @@
|
|||||||
---
|
---
|
||||||
|
####################################################################
|
||||||
|
# WARNING: These are designed specifically for Ansible tests #
|
||||||
|
# and should not be used as examples of how to write Ansible roles #
|
||||||
|
####################################################################
|
||||||
|
|
||||||
- name: Create random names
|
- name: Create random names
|
||||||
set_fact:
|
set_fact:
|
||||||
cname: "{{ 'ansible-container-%0x' % ((2**32) | random) }}"
|
cname: "{{ 'ansible-container-%0x' % ((2**32) | random) }}"
|
||||||
|
|||||||
@ -1,3 +1,8 @@
|
|||||||
|
####################################################################
|
||||||
|
# WARNING: These are designed specifically for Ansible tests #
|
||||||
|
# and should not be used as examples of how to write Ansible roles #
|
||||||
|
####################################################################
|
||||||
|
|
||||||
- include_tasks: test_secrets.yml
|
- include_tasks: test_secrets.yml
|
||||||
when: docker_py_version is version('2.1.0', '>=') and docker_api_version is version('1.25', '>=')
|
when: docker_py_version is version('2.1.0', '>=') and docker_api_version is version('1.25', '>=')
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,8 @@
|
|||||||
|
####################################################################
|
||||||
|
# WARNING: These are designed specifically for Ansible tests #
|
||||||
|
# and should not be used as examples of how to write Ansible roles #
|
||||||
|
####################################################################
|
||||||
|
|
||||||
- include_tasks: test_stack.yml
|
- include_tasks: test_stack.yml
|
||||||
when: docker_api_version is version('1.25', '>=')
|
when: docker_api_version is version('1.25', '>=')
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,8 @@
|
|||||||
|
####################################################################
|
||||||
|
# WARNING: These are designed specifically for Ansible tests #
|
||||||
|
# and should not be used as examples of how to write Ansible roles #
|
||||||
|
####################################################################
|
||||||
|
|
||||||
- include_tasks: test_stack_info.yml
|
- include_tasks: test_stack_info.yml
|
||||||
when: docker_api_version is version('1.25', '>=')
|
when: docker_api_version is version('1.25', '>=')
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,8 @@
|
|||||||
|
####################################################################
|
||||||
|
# WARNING: These are designed specifically for Ansible tests #
|
||||||
|
# and should not be used as examples of how to write Ansible roles #
|
||||||
|
####################################################################
|
||||||
|
|
||||||
- include_tasks: test_stack_task_info.yml
|
- include_tasks: test_stack_task_info.yml
|
||||||
when: docker_api_version is version('1.25', '>=')
|
when: docker_api_version is version('1.25', '>=')
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,8 @@
|
|||||||
|
####################################################################
|
||||||
|
# WARNING: These are designed specifically for Ansible tests #
|
||||||
|
# and should not be used as examples of how to write Ansible roles #
|
||||||
|
####################################################################
|
||||||
|
|
||||||
- name: Run Docker Swarm tests
|
- name: Run Docker Swarm tests
|
||||||
when:
|
when:
|
||||||
- docker_py_version is version('1.10.0', '>=')
|
- docker_py_version is version('1.10.0', '>=')
|
||||||
|
|||||||
@ -1,3 +1,8 @@
|
|||||||
|
####################################################################
|
||||||
|
# WARNING: These are designed specifically for Ansible tests #
|
||||||
|
# and should not be used as examples of how to write Ansible roles #
|
||||||
|
####################################################################
|
||||||
|
|
||||||
- include_tasks: test_swarm_info.yml
|
- include_tasks: test_swarm_info.yml
|
||||||
# Maximum of 1.24 (docker API version for docker_swarm_info) and 1.25 (docker API version for docker_swarm) is 1.25
|
# Maximum of 1.24 (docker API version for docker_swarm_info) and 1.25 (docker API version for docker_swarm) is 1.25
|
||||||
when: docker_py_version is version('1.10.0', '>=') and docker_api_version is version('1.25', '>=')
|
when: docker_py_version is version('1.10.0', '>=') and docker_api_version is version('1.25', '>=')
|
||||||
|
|||||||
@ -1,4 +1,9 @@
|
|||||||
---
|
---
|
||||||
|
####################################################################
|
||||||
|
# WARNING: These are designed specifically for Ansible tests #
|
||||||
|
# and should not be used as examples of how to write Ansible roles #
|
||||||
|
####################################################################
|
||||||
|
|
||||||
|
|
||||||
# Create random name prefix (for containers, networks, ...)
|
# Create random name prefix (for containers, networks, ...)
|
||||||
- name: Create random name prefix
|
- name: Create random name prefix
|
||||||
|
|||||||
@ -1,4 +1,9 @@
|
|||||||
---
|
---
|
||||||
|
####################################################################
|
||||||
|
# WARNING: These are designed specifically for Ansible tests #
|
||||||
|
# and should not be used as examples of how to write Ansible roles #
|
||||||
|
####################################################################
|
||||||
|
|
||||||
- include_tasks: test_docker_swarm_service_info.yml
|
- include_tasks: test_docker_swarm_service_info.yml
|
||||||
when: docker_py_version is version('2.0.0', '>=') and docker_api_version is version('1.24', '>=')
|
when: docker_py_version is version('2.0.0', '>=') and docker_api_version is version('1.24', '>=')
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,9 @@
|
|||||||
---
|
---
|
||||||
|
####################################################################
|
||||||
|
# WARNING: These are designed specifically for Ansible tests #
|
||||||
|
# and should not be used as examples of how to write Ansible roles #
|
||||||
|
####################################################################
|
||||||
|
|
||||||
- name: Create random name prefix
|
- name: Create random name prefix
|
||||||
set_fact:
|
set_fact:
|
||||||
name_prefix: "{{ 'ansible-test-%0x' % ((2**32) | random) }}"
|
name_prefix: "{{ 'ansible-test-%0x' % ((2**32) | random) }}"
|
||||||
|
|||||||
@ -1,4 +1,9 @@
|
|||||||
---
|
---
|
||||||
|
####################################################################
|
||||||
|
# WARNING: These are designed specifically for Ansible tests #
|
||||||
|
# and should not be used as examples of how to write Ansible roles #
|
||||||
|
####################################################################
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- name: Create random volume name
|
- name: Create random volume name
|
||||||
set_fact:
|
set_fact:
|
||||||
|
|||||||
@ -1,4 +1,9 @@
|
|||||||
---
|
---
|
||||||
|
####################################################################
|
||||||
|
# WARNING: These are designed specifically for Ansible tests #
|
||||||
|
# and should not be used as examples of how to write Ansible roles #
|
||||||
|
####################################################################
|
||||||
|
|
||||||
- name: Setup Docker
|
- name: Setup Docker
|
||||||
when: ansible_facts.distribution ~ ansible_facts.distribution_major_version not in ['CentOS6', 'RedHat6']
|
when: ansible_facts.distribution ~ ansible_facts.distribution_major_version not in ['CentOS6', 'RedHat6']
|
||||||
block:
|
block:
|
||||||
|
|||||||
@ -1,3 +1,8 @@
|
|||||||
|
####################################################################
|
||||||
|
# WARNING: These are designed specifically for Ansible tests #
|
||||||
|
# and should not be used as examples of how to write Ansible roles #
|
||||||
|
####################################################################
|
||||||
|
|
||||||
- when: ansible_facts.distribution ~ ansible_facts.distribution_major_version not in ['CentOS6', 'RedHat6']
|
- when: ansible_facts.distribution ~ ansible_facts.distribution_major_version not in ['CentOS6', 'RedHat6']
|
||||||
include_tasks:
|
include_tasks:
|
||||||
file: setup.yml
|
file: setup.yml
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user