Kenichi Omichi
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with
10 additions and
73 deletions
.gitlab-ci.yml
README.md
ansible.cfg
ansible_version.yml
docs/ansible.md
requirements-2.10.txt
requirements-2.9.txt
requirements-2.9.yml
roles/download/tasks/download_container.yml
roles/download/tasks/download_file.yml
tests/cloud_playbooks/roles/packet-ci/templates/inventory.j2
tests/cloud_playbooks/wait-for-ssh.yml
tests/requirements-2.10.txt
tests/requirements-2.9.txt
@ -34,7 +34,7 @@ variables:
RECOVER_CONTROL_PLANE_TEST : "false"
RECOVER_CONTROL_PLANE_TEST_GROUPS : "etcd[2:],kube_control_plane[1:]"
TERRAFORM_VERSION : 1.0 .8
ANSIBLE_MAJOR_VERSION : "2.10 "
ANSIBLE_MAJOR_VERSION : "2.11 "
before_script:
- ./tests/scripts/rebase.sh
@ -163,7 +163,7 @@ Note: Upstart/SysV init based OS types are not supported.
## Requirements
- **Minimum required version of Kubernetes is v1.21**
- **Ansible v2.9.x , Jinja 2.11+ and python-netaddr is installed on the machine that will run Ansible commands**
- **Ansible v2.11+ , Jinja 2.11+ and python-netaddr is installed on the machine that will run Ansible commands**
- The target servers must have **access to the Internet** in order to pull docker images. Otherwise, additional configuration is required (See [Offline Environment ](docs/offline-environment.md ))
- The target servers are configured to allow **IPv4 forwarding** .
- If using IPv6 for pods and services, the target servers are configured to allow **IPv6 forwarding** .
@ -1,6 +1,6 @@
[ssh_connection]
pipelining = True
ssh_args = -o ControlMaster=auto -o ControlPersist=30m -o ConnectionAttempts=100 -o UserKnownHostsFile=/dev/null
ansible_ ssh_args = -o ControlMaster=auto -o ControlPersist=30m -o ConnectionAttempts=100 -o UserKnownHostsFile=/dev/null
#control_path = ~/.ssh/ansible-%%r@%%h:%%p
[defaults]
# https://github.com/ansible/ansible/issues/56930 (to ignore group names with - and .)
@ -3,8 +3,7 @@
gather_facts : false
become : no
vars:
minimal_ansible_version : 2.9 .0
minimal_ansible_version_2_10 : 2.10 .11
minimal_ansible_version : 2.11 .0
maximal_ansible_version : 2.13 .0
ansible_connection : local
tags : always
@ -18,17 +17,6 @@
tags:
- check
- name : "Check Ansible version > {{ minimal_ansible_version_2_10 }} when using ansible 2.10"
assert:
msg : "When using Ansible 2.10, the minimum supported version is {{ minimal_ansible_version_2_10 }}"
that:
- ansible_version.string is version(minimal_ansible_version_2_10, ">=")
- ansible_version.string is version(maximal_ansible_version, "<")
when:
- ansible_version.string is version('2.10.0', ">=")
tags:
- check
- name : "Check that python netaddr is installed"
assert:
msg : "Python netaddr is not present"
@ -26,8 +26,6 @@ Based on the table below and the available python version for your ansible host
| Ansible Version | Python Version |
| --------------- | -------------- |
| 2.9 | 2.7,3.5-3.8 |
| 2.10 | 2.7,3.5-3.8 |
| 2.11 | 2.7,3.5-3.9 |
| 2.12 | 3.8-3.10 |
@ -1,10 +0,0 @@
ansible==3.4.0
ansible-base==2.10.15
cryptography==2.8
jinja2==2.11.3
netaddr==0.7.19
pbr==5.4.4
jmespath==0.9.5
ruamel.yaml==0.16.10
ruamel.yaml.clib==0.2.6
MarkupSafe==1.1.1
@ -1,10 +0,0 @@
ansible==2.9.27
cryptography==2.8
jinja2==2.11.3
netaddr==0.7.19
pbr==5.4.4
jmespath==0.9.5
ruamel.yaml==0.16.10
ruamel.yaml.clib==0.2.6 ; python_version >= '3.5'
ruamel.yaml.clib==0.2.2 ; python_version < '3.5'
MarkupSafe==1.1.1
@ -1,4 +0,0 @@
---
collections:
- name : community.general
version : '<3.0'
@ -83,7 +83,7 @@
synchronize:
src : "{{ image_path_final }}"
dest : "{{ image_path_cached }}"
use_ssh_args : "{{ has_bastion | default(false) }}"
use_ssh_args : true
mode : pull
when:
- not image_is_cached
@ -95,7 +95,7 @@
synchronize:
src : "{{ image_path_cached }}"
dest : "{{ image_path_final }}"
use_ssh_args : "{{ has_bastion | default(false) }}"
use_ssh_args : true
mode : push
delegate_facts : no
register : upload_image
@ -103,7 +103,7 @@
synchronize:
src : "{{ file_path_cached }}"
dest : "{{ file_path_cached }}"
use_ssh_args : "{{ has_bastion | default(false) }}"
use_ssh_args : true
mode : pull
when:
- download_force_cache
@ -114,7 +114,7 @@
synchronize:
src : "{{ file_path_cached }}"
dest : "{{ download.dest }}"
use_ssh_args : "{{ has_bastion | default(false) }}"
use_ssh_args : true
mode : push
register : get_task
until : get_task is succeeded
@ -1,6 +1,6 @@
[all]
{% for instance in vms.results %}
instance-{{ loop.index }} ansible_ssh_ host={{instance.stdout}}
instance-{{ loop.index }} ansible_host={{instance.stdout}}
{% endfor %}
{% if mode is defined and mode in ["separate", "separate-scale"] %}
@ -6,7 +6,7 @@
tasks:
- name : Wait until SSH is available
wait_for:
host : "{{ ansible_ssh_ host }}"
host : "{{ ansible_host }}"
port : 22
timeout : 240
delegate_to : localhost
@ -1,11 +0,0 @@
-r ../requirements-2.10.txt
yamllint==1.19.0
apache-libcloud==2.2.1
tox==3.11.1
dopy==0.3.7
ansible-lint==5.4.0
molecule==3.0.6
molecule-vagrant==0.3
testinfra==5.2.2
python-vagrant==0.5.15
ara[server]==1.5.7
@ -1,14 +0,0 @@
-r ../requirements-2.9.txt
yamllint==1.19.0
apache-libcloud==2.2.1
tox==3.11.1
dopy==0.3.7
ansible-lint==5.4.0 ; python_version >= '3.0'
ansible-lint==4.2.0 ; python_version < '3.0'
molecule==3.0.6 ; python_version >= '3.0'
molecule==3.0.2 ; python_version < '3.0'
molecule-vagrant==0.3
testinfra==5.2.2 ; python_version >= '3.0'
testinfra==3.4.0 ; python_version < '3.0'
python-vagrant==0.5.15
ara[server]==1.5.7