Skip to content

Add support for Ubuntu 22 and Ubuntu 24 #519

Add support for Ubuntu 22 and Ubuntu 24

Add support for Ubuntu 22 and Ubuntu 24 #519

Workflow file for this run

name: Build
on:
workflow_dispatch:
push:
pull_request:
jobs:
ansible-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10.16'
- name: Set up Ansible
run: |
pip install -r requirements.txt
bin/setup
- name: Ansible Lint
run: bin/lint
playbook-tests-lxc:
# Ubuntu 22 and newer install lxd via snap which complicates things.
# When we need to update from Ubuntu 20 then we can use incus which is
# now the better fork of lxd.
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
image:
- "ubuntu:20.04"
- "ubuntu:22.04"
- "ubuntu:24.04"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10.15'
- name: Set up Ansible
run: |
pip install -r requirements.txt
bin/setup
- name: Cache Ruby binary compiling
id: cache-ruby
uses: actions/cache@v3
with:
path: ~/.rbenv
key: ${{ runner.os }}-ruby-${{ github.sha }}
restore-keys: |
${{ runner.os }}-ruby-
${{ runner.os }}-
- name: Set up LXD
run: |
sudo apt-get install --yes lxd
sudo lxd init --auto
sudo usermod -aG lxd "$USER"
ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa
sudo su -c "LXC_IMAGE='${{ matrix.image }}' `pwd`/bin/setup-lxc" - "$USER"
- name: Test Playbooks
run: ansible-playbook tests/suite.yml --limit lxc