From 4447cc0eb558051dd7080e12f9e3e698c20b417e Mon Sep 17 00:00:00 2001 From: Miguel Jacq Date: Tue, 3 Dec 2024 16:24:37 +1100 Subject: [PATCH 1/3] Depend on debconf-utils, which provides the debconf-get-selections executable --- vars/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/vars/main.yml b/vars/main.yml index 985c64c..38faf60 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -55,6 +55,7 @@ percona_server_debconf_selections: percona_server_dependencies_pre: - software-properties-common - dirmngr + - debconf-utils percona_server_dependencies: - "percona-server-client{{ percona_server_version_deb }}" From 0e2a2d88c55eb2398a460dd6bb354d2a428c11ba Mon Sep 17 00:00:00 2001 From: Mischa ter Smitten Date: Tue, 3 Dec 2024 10:22:53 +0100 Subject: [PATCH 2/3] Consistency changes --- .github/workflows/ci.yml | 15 ++++++------ Vagrantfile | 39 +++++++++++++++++++------------- meta/main.yml | 10 ++++---- molecule/default/collections.yml | 6 +---- molecule/default/molecule.yml | 2 +- tasks/configure.yml | 4 ++-- tasks/plugins.yml | 2 +- tasks/repository.yml | 2 +- tasks/toolkit-udfs.yml | 2 +- tasks/zoneinfo.yml | 2 +- tests/test.yml | 3 ++- tests/vagrant.yml | 3 ++- 12 files changed, 48 insertions(+), 42 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1f7278a..d204d7b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,14 +44,15 @@ jobs: fail-fast: false matrix: include: - - distro: debian8 - - distro: debian9 - distro: debian10 - - distro: ubuntu1604 - ansible-version: '>=2.10, <2.11' - - distro: ubuntu1604 + ansible-version: '>=9, <10' + - distro: debian11 + - distro: debian12 - distro: ubuntu1804 + ansible-version: '>=9, <10' - distro: ubuntu2004 + - distro: ubuntu2204 + - distro: ubuntu2404 steps: - name: Check out the codebase @@ -65,8 +66,8 @@ jobs: python-version: '3.x' - name: Install test dependencies - run: pip install 'ansible${{ matrix.ansible-version }}' molecule[docker] docker - + run: | + pip install 'ansible${{ matrix.ansible-version }}' molecule-plugins[docker] docker - name: Run Molecule tests run: | molecule test diff --git a/Vagrantfile b/Vagrantfile index a0182a0..e86d32d 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -4,13 +4,6 @@ role = File.basename(File.expand_path(File.dirname(__FILE__))) boxes = [ - { - :name => "ubuntu-1604", - :box => "bento/ubuntu-16.04", - :ip => '10.0.0.12', - :cpu => "50", - :ram => "256" - }, { :name => "ubuntu-1804", :box => "bento/ubuntu-18.04", @@ -23,21 +16,21 @@ boxes = [ :box => "bento/ubuntu-20.04", :ip => '10.0.0.14', :cpu => "50", - :ram => "384" + :ram => "512" }, { - :name => "debian-8", - :box => "bento/debian-8", - :ip => '10.0.0.16', + :name => "ubuntu-2204", + :box => "bento/ubuntu-22.04", + :ip => '10.0.0.15', :cpu => "50", - :ram => "256" + :ram => "512" }, { - :name => "debian-9", - :box => "bento/debian-9", - :ip => '10.0.0.17', + :name => "ubuntu-2404", + :box => "bento/ubuntu-24.04", + :ip => '10.0.0.16', :cpu => "50", - :ram => "256" + :ram => "512" }, { :name => "debian-10", @@ -46,6 +39,20 @@ boxes = [ :cpu => "50", :ram => "256" }, + { + :name => "debian-11", + :box => "bento/debian-11", + :ip => '10.0.0.19', + :cpu => "50", + :ram => "256" + }, + { + :name => "debian-12", + :box => "bento/debian-12", + :ip => '10.0.0.20', + :cpu => "50", + :ram => "384" + }, ] Vagrant.configure("2") do |config| diff --git a/meta/main.yml b/meta/main.yml index 1c48933..bc4ab3f 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -1,9 +1,8 @@ # meta file --- galaxy_info: - namespace: oefenweb + author: oefenweb role_name: percona_server - author: Mischa ter Smitten company: Oefenweb.nl B.V. description: Set up percona-server server in Debian-like systems license: MIT @@ -11,14 +10,15 @@ galaxy_info: platforms: - name: Ubuntu versions: - - xenial - bionic - focal + - jammy + - noble - name: Debian versions: - - jessie - - stretch - buster + - bullseye + - bookworm galaxy_tags: - system - database diff --git a/molecule/default/collections.yml b/molecule/default/collections.yml index c3d7e2a..1062b36 100644 --- a/molecule/default/collections.yml +++ b/molecule/default/collections.yml @@ -1,6 +1,2 @@ --- -collections: - - name: community.docker - version: '>=1.2.0,<2' - - name: community.general - version: '>=2,<3' +collections: [] diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index 8841165..908aaf6 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -5,7 +5,7 @@ driver: name: docker platforms: - name: instance - image: "geerlingguy/docker-${MOLECULE_DISTRO:-ubuntu1604}-ansible:latest" + image: "geerlingguy/docker-${MOLECULE_DISTRO:-ubuntu2004}-ansible:latest" command: ${MOLECULE_DOCKER_COMMAND:-""} volumes: - /sys/fs/cgroup:/sys/fs/cgroup:rw diff --git a/tasks/configure.yml b/tasks/configure.yml index 1b635c6..78da43c 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -40,7 +40,7 @@ dest: "{{ percona_server_etc_mysql_my_cnf }}" owner: root group: root - mode: 0644 + mode: '0644' notify: restart percona-server tags: - percona-server-configure-global-my-cnf @@ -63,7 +63,7 @@ dest: '~root/.my.cnf' owner: root group: root - mode: 0600 + mode: '0600' when: percona_server_user_root_cnf_manage tags: - percona-server-configure-root-my-cnf diff --git a/tasks/plugins.yml b/tasks/plugins.yml index 71e2240..d7cde03 100644 --- a/tasks/plugins.yml +++ b/tasks/plugins.yml @@ -6,7 +6,7 @@ state: directory owner: root group: root - mode: 0755 + mode: '0755' tags: - percona-server-plugins-lock-directory diff --git a/tasks/repository.yml b/tasks/repository.yml index 5c5017f..c9110ad 100644 --- a/tasks/repository.yml +++ b/tasks/repository.yml @@ -33,6 +33,6 @@ dest: /etc/apt/preferences.d/00percona.pref owner: root group: root - mode: 0644 + mode: '0644' tags: - percona-server-repository-apt-pin diff --git a/tasks/toolkit-udfs.yml b/tasks/toolkit-udfs.yml index d95d41f..661cc70 100644 --- a/tasks/toolkit-udfs.yml +++ b/tasks/toolkit-udfs.yml @@ -6,7 +6,7 @@ state: directory owner: root group: root - mode: 0755 + mode: '0755' tags: - percona-server-toolkit-udfs-lock-directory diff --git a/tasks/zoneinfo.yml b/tasks/zoneinfo.yml index 07ba099..57351db 100644 --- a/tasks/zoneinfo.yml +++ b/tasks/zoneinfo.yml @@ -6,7 +6,7 @@ state: directory owner: root group: root - mode: 0755 + mode: '0755' tags: - percona-server-zoneinfo-lock-directory diff --git a/tests/test.yml b/tests/test.yml index 8d7cd5f..d62b457 100644 --- a/tests/test.yml +++ b/tests/test.yml @@ -1,6 +1,7 @@ # test file --- -- hosts: localhost +- name: converge + hosts: localhost connection: local become: true pre_tasks: diff --git a/tests/vagrant.yml b/tests/vagrant.yml index 851ce22..09d366d 100644 --- a/tests/vagrant.yml +++ b/tests/vagrant.yml @@ -1,6 +1,7 @@ # test file --- -- hosts: all +- name: converge + hosts: all remote_user: vagrant become: true pre_tasks: From f8fa121c400907d4818a16c371ead5757d203836 Mon Sep 17 00:00:00 2001 From: Mischa ter Smitten Date: Tue, 3 Dec 2024 10:30:57 +0100 Subject: [PATCH 3/3] Fix failing tests --- README.md | 3 +++ vars/main.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/README.md b/README.md index 2a25e67..4e83498 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,9 @@ Set up a [percona-server](https://www.percona.com/software/mysql-database/percon * `tee` (will not be installed) * `software-properties-common` (will be installed) * `dirmngr` (will be installed) +* `gpg-agent` (will be installed) +* `apt-transport-https` (will be installed) +* `debconf-utils` (will be installed) #### Variables diff --git a/vars/main.yml b/vars/main.yml index 38faf60..37c27a7 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -55,6 +55,8 @@ percona_server_debconf_selections: percona_server_dependencies_pre: - software-properties-common - dirmngr + - gpg-agent + - apt-transport-https - debconf-utils percona_server_dependencies: