Skip to content

Commit

Permalink
Upgrade ansible-core to 2.16.4 (#10984)
Browse files Browse the repository at this point in the history
* upgrade ansible version

Needed for with_first_found to work correctly:
ansible/ansible#70772 fixed in 2.16

* Remove unused google cloud cloud_playbook

* Fix dpkg_selection on non-existing packages

Needed since ansible-core>2.16, see:
ansible/ansible@f10d11b
  • Loading branch information
VannTen authored Mar 14, 2024
1 parent 7f785a5 commit 7f6ca80
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 241 deletions.
2 changes: 1 addition & 1 deletion docs/ansible.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Based on the table below and the available python version for your ansible host

| Ansible Version | Python Version |
|-----------------|----------------|
| >= 2.15.5 | 3.9-3.11 |
| >= 2.16.4 | 3.9-3.11 |

## Inventory

Expand Down
2 changes: 1 addition & 1 deletion meta/runtime.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
requires_ansible: '>=2.15.5'
requires_ansible: '>=2.16.4'
2 changes: 1 addition & 1 deletion playbooks/ansible_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
become: no
run_once: true
vars:
minimal_ansible_version: 2.15.5 # 2.15 versions before 2.15.5 are known to be buggy for kubespray
minimal_ansible_version: 2.16.4
maximal_ansible_version: 2.17.0
tags: always
tasks:
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
ansible==8.5.0
ansible==9.3.0
cryptography==41.0.4
jinja2==3.1.2
jmespath==1.0.1
MarkupSafe==2.1.3
netaddr==0.9.0
pbr==5.11.1
ruamel.yaml==0.17.35
ruamel.yaml==0.18.5
ruamel.yaml.clib==0.2.8
4 changes: 4 additions & 0 deletions roles/container-engine/docker/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,11 @@
name: "{{ item }}"
selection: install
when: ansible_pkg_mgr == 'apt'
register: ret
changed_when: false
failed_when:
- ret is failed
- ret.msg != ( "Failed to find package '" + item + "' to perform selection 'install'." )
with_items:
- "{{ containerd_package }}"
- docker-ce
Expand Down
22 changes: 0 additions & 22 deletions tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,28 +22,6 @@ create-tf:
delete-tf:
./scripts/delete-tf.sh

create-gce: init-gce
ansible-playbook cloud_playbooks/create-gce.yml -i local_inventory/hosts.cfg -c local \
$(ANSIBLE_LOG_LEVEL) \
-e @"files/${CI_JOB_NAME}.yml" \
-e gce_credentials_file=$(HOME)/.ssh/gce.json \
-e gce_project_id=$(GCE_PROJECT_ID) \
-e gce_service_account_email=$(GCE_ACCOUNT) \
-e inventory_path=$(INVENTORY) \
-e test_id=$(TEST_ID) \
-e preemptible=$(GCE_PREEMPTIBLE)


delete-gce:
ansible-playbook -i $(INVENTORY) cloud_playbooks/delete-gce.yml -c local \
$(ANSIBLE_LOG_LEVEL) \
-e @"files/${CI_JOB_NAME}.yml" \
-e test_id=$(TEST_ID) \
-e gce_project_id=$(GCE_PROJECT_ID) \
-e gce_service_account_email=$(GCE_ACCOUNT) \
-e gce_credentials_file=$(HOME)/.ssh/gce.json \
-e inventory_path=$(INVENTORY)

create-do: init-do
ansible-playbook cloud_playbooks/create-do.yml -i local_inventory/hosts.cfg -c local \
${ANSIBLE_LOG_LEVEL} \
Expand Down
81 changes: 0 additions & 81 deletions tests/cloud_playbooks/create-gce.yml

This file was deleted.

50 changes: 0 additions & 50 deletions tests/cloud_playbooks/delete-gce.yml

This file was deleted.

82 changes: 0 additions & 82 deletions tests/cloud_playbooks/upload-logs-gcs.yml

This file was deleted.

2 changes: 1 addition & 1 deletion tests/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-r ../requirements.txt
ansible-lint==6.20.3
ansible-lint==6.22.2
apache-libcloud==3.8.0
ara[server]==1.7.0
dopy==0.3.7
Expand Down

0 comments on commit 7f6ca80

Please sign in to comment.