Skip to content

Commit 64f8a84

Browse files
committed
ci: update Ansible to 3.4.0
This also updates - community.general to 2.5.2 - ansible.posix to 1.2.0 Fix #1531
1 parent a880aba commit 64f8a84

File tree

6 files changed

+18
-24
lines changed

6 files changed

+18
-24
lines changed

.github/workflows/deploy.yml

+5-7
Original file line numberDiff line numberDiff line change
@@ -56,19 +56,17 @@ jobs:
5656
package
5757
5858
- name: Install ansible
59-
# The command pip3 install --user ansible==2.10.17 doesn't work as we have an old version
60-
# See https://docs.ansible.com/ansible/2.10/installation_guide/intro_installation.html#installing-devel-from-github-with-pip
6159
# NOTE: during version bump don't forget to update in other places: provisioning-by-ansible.yml and provisioning-by-terraform.yml
62-
run: python3 -m pip install --user https://github.com/ansible/ansible/archive/refs/tags/v2.10.17.tar.gz
60+
run: pip3 install ansible==3.4.0
6361

64-
# https://docs.ansible.com/ansible/2.10/collections/community/general/uptimerobot_module.html
62+
# https://docs.ansible.com/ansible/3/collections/community/general/uptimerobot_module.html
6563
# https://docs.ansible.com/ansible/latest/collections_guide/collections_installing.html#installing-an-older-version-of-a-collection
6664
- name: Install community.general collection for UptimeRobot
67-
run: ansible-galaxy collection install community.general:==1.3.6
65+
run: ansible-galaxy collection install community.general:==2.5.2
6866

69-
# https://docs.ansible.com/ansible/2.10/collections/ansible/posix/debug_callback.html
67+
# https://docs.ansible.com/ansible/3/collections/ansible/posix/debug_callback.html
7068
- name: Install ansible.posix.debug for debug callback
71-
run: ansible-galaxy collection install ansible.posix:==1.1.1
69+
run: ansible-galaxy collection install ansible.posix:==1.2.0
7270

7371
- name: Run deploy.sh
7472
env:

.github/workflows/provision-by-ansible.yml

+3-5
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,8 @@ jobs:
2929
persist-credentials: false
3030

3131
- name: Install ansible
32-
# The command pip3 install --user ansible==2.10.17 doesn't work as we have an old version
33-
# See https://docs.ansible.com/ansible/2.10/installation_guide/intro_installation.html#installing-devel-from-github-with-pip
3432
# NOTE: during version bump don't forget to update in other places: deploy.yml and provisioning-by-terraform.yml
35-
run: python3 -m pip install --user https://github.com/ansible/ansible/archive/refs/tags/v2.10.17.tar.gz
33+
run: pip3 install ansible==3.4.0
3634

3735
- name: Show ansible version
3836
run: ansible --version
@@ -65,9 +63,9 @@ jobs:
6563
working-directory: infra/ansible
6664
env:
6765
# Disable host key checking to suppress interactive prompt.
68-
# See: https://docs.ansible.com/ansible/2.10/user_guide/connection_details.html#managing-host-key-checking
66+
# See: https://docs.ansible.com/ansible/3/user_guide/connection_details.html#managing-host-key-checking
6967
ANSIBLE_HOST_KEY_CHECKING: 'False'
70-
# See: https://docs.ansible.com/ansible/2.10/reference_appendices/config.html#envvar-ANSIBLE_PRIVATE_KEY_FILE
68+
# See: https://docs.ansible.com/ansible/3/reference_appendices/config.html#envvar-ANSIBLE_PRIVATE_KEY_FILE
7169
ANSIBLE_PRIVATE_KEY_FILE: 'coder_rsa'
7270
run: ansible-playbook prod.yml -i prod.inventory
7371

.github/workflows/provision-by-terraform.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,8 @@ jobs:
6868
tfenv use
6969
7070
- name: Install ansible-vault
71-
# The command pip3 install --user ansible==2.10.17 doesn't work as we have an old version
72-
# See https://docs.ansible.com/ansible/2.10/installation_guide/intro_installation.html#installing-devel-from-github-with-pip
7371
# NOTE: during version bump don't forget to update in other places: deploy.yml and provisioning-by-ansible.yml
74-
run: python3 -m pip install --user https://github.com/ansible/ansible/archive/refs/tags/v2.10.17.tar.gz
72+
run: pip3 install ansible==3.4.0
7573

7674
- name: Show tools versions
7775
env:

infra/ansible/prod.inventory

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Ansible inventory file
2-
# See: https://docs.ansible.com/ansible/2.10/user_guide/intro_inventory.html
2+
# See: https://docs.ansible.com/ansible/3/user_guide/intro_inventory.html
33

44
[prod]
55
my-stamps.ru ansible_host=46.101.232.167
66

77
[all:vars]
8-
# https://docs.ansible.com/ansible/2.10/reference_appendices/python_3_support.html#using-python-3-on-the-managed-machines-with-commands-and-playbooks
9-
# https://docs.ansible.com/ansible/2.10/reference_appendices/interpreter_discovery.html
8+
# https://docs.ansible.com/ansible/3/reference_appendices/python_3_support.html#using-python-3-on-the-managed-machines-with-commands-and-playbooks
9+
# https://docs.ansible.com/ansible/3/reference_appendices/interpreter_discovery.html
1010
ansible_python_interpreter=/usr/bin/python3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Ansible inventory file
2-
# See: https://docs.ansible.com/ansible/2.10/user_guide/intro_inventory.html
2+
# See: https://docs.ansible.com/ansible/3/user_guide/intro_inventory.html
33

44
[prod]
55
my-stamps.ru
66

77
[all:vars]
8-
# https://docs.ansible.com/ansible/2.10/reference_appendices/python_3_support.html#using-python-3-on-the-managed-machines-with-commands-and-playbooks
9-
# https://docs.ansible.com/ansible/2.10/reference_appendices/interpreter_discovery.html
8+
# https://docs.ansible.com/ansible/3/reference_appendices/python_3_support.html#using-python-3-on-the-managed-machines-with-commands-and-playbooks
9+
# https://docs.ansible.com/ansible/3/reference_appendices/interpreter_discovery.html
1010
ansible_python_interpreter=/usr/bin/python3

src/main/scripts/ci/deploy.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ cleanup() {
2424
trap 'cleanup' EXIT SIGHUP SIGINT SIGTERM
2525

2626
# Disable host key checking to suppress interactive prompt.
27-
# See: https://docs.ansible.com/ansible/2.10/user_guide/connection_details.html#managing-host-key-checking
27+
# See: https://docs.ansible.com/ansible/3/user_guide/connection_details.html#managing-host-key-checking
2828
export ANSIBLE_HOST_KEY_CHECKING=False
2929

3030
# Make the output of a failed task human readable.
31-
# See: https://docs.ansible.com/ansible/2.10/reference_appendices/config.html#envvar-ANSIBLE_STDOUT_CALLBACK
31+
# See: https://docs.ansible.com/ansible/3/reference_appendices/config.html#envvar-ANSIBLE_STDOUT_CALLBACK
3232
export ANSIBLE_STDOUT_CALLBACK=debug
3333

3434
if [ -z "${VAULT_PASSWORD:-}" ]; then
@@ -39,7 +39,7 @@ fi
3939
printf '%s' "$VAULT_PASSWORD" >"$PASS_FILE"
4040

4141
# LATER: consider specifying private key via env variable
42-
# https://docs.ansible.com/ansible/2.10/reference_appendices/config.html#envvar-ANSIBLE_PRIVATE_KEY_FILE
42+
# https://docs.ansible.com/ansible/3/reference_appendices/config.html#envvar-ANSIBLE_PRIVATE_KEY_FILE
4343
for FILE in "$PRIVATE_KEY" "$VARS_FILE"; do
4444
FILENAME="$(basename "$FILE")"
4545
echo "Decrypting ${FILENAME}.enc to $FILENAME"

0 commit comments

Comments
 (0)