Skip to content

Commit

Permalink
Install Ansible with apt in Ubuntu workflows
Browse files Browse the repository at this point in the history
We were having problems with the python-setup action when trying to use
Ubuntu 24.04 because it uses Python 3.12 instead of Python 3.8 and
because the way to install ansible with pip has changed over the years.

So we're now installing ansible with apt, just like we do in Debian
workflows. This will also install the python3 package if it isn't
already installed.
  • Loading branch information
javierm committed Jul 3, 2024
1 parent de78986 commit 8e898db
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,10 @@ jobs:
rails_env: [staging, production]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Update system packages
run: sudo apt-get update -y
- name: Install OpenSSH
run: sudo apt-get install -y openssh-server
- name: Install Ansible
run: pip3 install ansible
- name: Install needed packages
run: sudo apt-get install -y openssh-server ansible
- name: Create hosts file
run: echo "localhost ansible_connection=local ansible_user=root" > hosts
- name: Generate dummy SSH key
Expand Down

0 comments on commit 8e898db

Please sign in to comment.