Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test updates #18

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions .github/workflows/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,12 @@ jobs:
strategy:
fail-fast: true
matrix:
config:
- image: "ubuntu"
tag: "latest" # latest == noble, as of this writing.
- image: "ubuntu"
tag: "jammy"
# - image: "ubuntu" # Not testing focal, because the "service start"
# tag: "focal" # task times out in molecule tests, and nobody knows why.
image:
- geerlingguy/docker-ubuntu2404-ansible:latest
- geerlingguy/docker-ubuntu2204-ansible:latest
- geerlingguy/docker-ubuntu2004-ansible:latest
- geerlingguy/docker-ubuntu1804-ansible:latest

steps:
- name: checkout
uses: actions/checkout@v4
Expand Down
16 changes: 9 additions & 7 deletions meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@
license: GPLv3
min_ansible_version: '2.0'
platforms:
- name: Ubuntu
versions:
- focal
- jammy
- noble
galaxy_tags: [ ]
dependencies: [ ]
- name: Ubuntu

Check failure on line 11 in meta/main.yml

View workflow job for this annotation

GitHub Actions / lint

yaml[indentation]

Wrong indentation: expected 4 but found 2
versions:
- trusty

Check failure on line 13 in meta/main.yml

View workflow job for this annotation

GitHub Actions / lint

yaml[indentation]

Wrong indentation: expected 6 but found 4
- xenial
- bionic
- jammy
- noble
galaxy_tags: []
dependencies: []
12 changes: 8 additions & 4 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,17 @@ lint: |
driver:
name: docker
platforms:
- name: "mariadb-${image:-ubuntu}-${tag:-latest}${TOX_ENVNAME}"
image: "${namespace:-robertdebock}/${image:-ubuntu}:${tag:-latest}"
command: /sbin/init
- name: instance
image: "geerlingguy/docker-${MOLECULE_DISTRO:-ubuntu2004}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
cgroupns_mode: host
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- /sys/fs/cgroup:/sys/fs/cgroup:rw
privileged: true
pre_build_image: true
tmpfs:
- /run
- /tmp
provisioner:
name: ansible
verifier:
Expand Down
23 changes: 14 additions & 9 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
---
- name: Define the list of supported ubuntu versions
ansible.builtin.set_fact:
- set_fact:

Check failure on line 1 in tasks/main.yml

View workflow job for this annotation

GitHub Actions / lint

fqcn[action-core]

Use FQCN for builtin module actions (set_fact).

Check failure on line 1 in tasks/main.yml

View workflow job for this annotation

GitHub Actions / lint

name[missing]

All tasks should be named.

Check failure on line 1 in tasks/main.yml

View workflow job for this annotation

GitHub Actions / lint

yaml[document-start]

Missing document start "---"
_supported_ubuntu_versions:
- '18.04'
- '20.04'
- '22.04'
- '24.04'

- name: Check if OS is Ubuntu LTS

Check failure on line 8 in tasks/main.yml

View workflow job for this annotation

GitHub Actions / lint

fqcn[action-core]

Use FQCN for builtin module actions (assert).
ansible.builtin.assert:
assert:
that:
- ansible_distribution == 'Ubuntu'
- ansible_distribution_version in _supported_ubuntu_versions
Expand Down Expand Up @@ -71,11 +69,18 @@
- python3-mysqldb
state: present

- name: Install MariaDB Server
when: not client_only
block:
- name: Ensure mariadb service is running and starts on boot
ansible.builtin.service:
- block:

Check failure on line 72 in tasks/main.yml

View workflow job for this annotation

GitHub Actions / lint

name[missing]

All tasks should be named.
- name: Ensure mysql is running and starts on boot

Check failure on line 73 in tasks/main.yml

View workflow job for this annotation

GitHub Actions / lint

fqcn[action-core]

Use FQCN for builtin module actions (service).
when: ansible_distribution == 'Ubuntu' and ansible_distribution_version is version("24.04", "<")
service:
name: mysql
state: started
enabled: true

# Service name changes in newer Ubuntu versions
- name: Ensure mariadb is running and starts on boot

Check failure on line 81 in tasks/main.yml

View workflow job for this annotation

GitHub Actions / lint

fqcn[action-core]

Use FQCN for builtin module actions (service).
when: ansible_distribution == 'Ubuntu' and ansible_distribution_version is version("24.04", ">=")
service:
name: mariadb
state: started
enabled: true
Expand Down