Skip to content

Commit fcba62a

Browse files
committed
ci: use mise to set up Ansible on CI
Part of #1748
1 parent 9f3db58 commit fcba62a

File tree

3 files changed

+32
-8
lines changed

3 files changed

+32
-8
lines changed

.github/workflows/deploy.yml

+13-3
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,19 @@ jobs:
5555
-Dmaven.test.skip=true \
5656
package
5757
58-
- name: Install ansible
59-
# NOTE: during version bump don't forget to update in other places: provisioning-by-ansible.yml and provisioning-by-terraform.yml
60-
run: pip3 install ansible==3.4.0
58+
- name: Install mise to set up Ansible
59+
uses: jdx/[email protected] # https://github.com/jdx/mise-action
60+
with:
61+
version: 2025.3.2 # [default: latest] mise version to install
62+
install: true # [default: true] run `mise install`
63+
cache: true # [default: true] cache mise using GitHub's cache
64+
log_level: info # [default: info] log level
65+
working_directory: infra/ansible # [default: .] directory to run mise in
66+
env:
67+
# Workaround: don't install some dependencies that we don't use (java, maven) or don't want (python)
68+
# See: https://github.com/jdx/mise-action/issues/183
69+
# https://mise.jdx.dev/configuration/settings.html#disable_tools
70+
MISE_DISABLE_TOOLS: java,maven,python
6171

6272
# https://docs.ansible.com/ansible/3/collections/community/general/uptimerobot_module.html
6373
# https://docs.ansible.com/ansible/latest/collections_guide/collections_installing.html#installing-an-older-version-of-a-collection

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

+13-3
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,19 @@ jobs:
2828
# Whether to configure the token or SSH key with the local git config. Default: true
2929
persist-credentials: false
3030

31-
- name: Install ansible
32-
# NOTE: during version bump don't forget to update in other places: deploy.yml and provisioning-by-terraform.yml
33-
run: pip3 install ansible==3.4.0
31+
- name: Install mise to set up Ansible
32+
uses: jdx/[email protected] # https://github.com/jdx/mise-action
33+
with:
34+
version: 2025.3.2 # [default: latest] mise version to install
35+
install: true # [default: true] run `mise install`
36+
cache: true # [default: true] cache mise using GitHub's cache
37+
log_level: info # [default: info] log level
38+
working_directory: infra/ansible # [default: .] directory to run mise in
39+
env:
40+
# Workaround: don't install some dependencies that we don't use (java, maven) or don't want (python)
41+
# See: https://github.com/jdx/mise-action/issues/183
42+
# https://mise.jdx.dev/configuration/settings.html#disable_tools
43+
MISE_DISABLE_TOOLS: java,maven,python
3444

3545
- name: Show ansible version
3646
run: ansible --version

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

+6-2
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,12 @@ jobs:
5959
MISE_DISABLE_TOOLS: java,maven
6060

6161
- name: Install ansible-vault
62-
# NOTE: during version bump don't forget to update in other places: deploy.yml and provisioning-by-ansible.yml
63-
run: pip3 install ansible==3.4.0
62+
working-directory: infra/ansible
63+
env:
64+
# Don't install some dependencies that we don't use (java, maven) or don't want (python)
65+
# https://mise.jdx.dev/configuration/settings.html#disable_tools
66+
MISE_DISABLE_TOOLS: java,maven,python
67+
run: mise install
6468

6569
- name: Show tools versions
6670
env:

0 commit comments

Comments
 (0)