Skip to content

Commit

Permalink
Merge pull request #55 from Oefenweb/pr-54
Browse files Browse the repository at this point in the history
WIP - Depend on debconf-utils, which provides the debconf-get-selections executable
  • Loading branch information
tersmitten authored Dec 3, 2024
2 parents f9a414d + f8fa121 commit 79ba2d7
Show file tree
Hide file tree
Showing 14 changed files with 54 additions and 42 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
39 changes: 23 additions & 16 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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|
Expand Down
10 changes: 5 additions & 5 deletions meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
# 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
min_ansible_version: 2.10.0
platforms:
- name: Ubuntu
versions:
- xenial
- bionic
- focal
- jammy
- noble
- name: Debian
versions:
- jessie
- stretch
- buster
- bullseye
- bookworm
galaxy_tags:
- system
- database
Expand Down
6 changes: 1 addition & 5 deletions molecule/default/collections.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
---
collections:
- name: community.docker
version: '>=1.2.0,<2'
- name: community.general
version: '>=2,<3'
collections: []
2 changes: 1 addition & 1 deletion molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tasks/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
2 changes: 1 addition & 1 deletion tasks/plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
state: directory
owner: root
group: root
mode: 0755
mode: '0755'
tags:
- percona-server-plugins-lock-directory

Expand Down
2 changes: 1 addition & 1 deletion tasks/repository.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion tasks/toolkit-udfs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
state: directory
owner: root
group: root
mode: 0755
mode: '0755'
tags:
- percona-server-toolkit-udfs-lock-directory

Expand Down
2 changes: 1 addition & 1 deletion tasks/zoneinfo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
state: directory
owner: root
group: root
mode: 0755
mode: '0755'
tags:
- percona-server-zoneinfo-lock-directory

Expand Down
3 changes: 2 additions & 1 deletion tests/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# test file
---
- hosts: localhost
- name: converge
hosts: localhost
connection: local
become: true
pre_tasks:
Expand Down
3 changes: 2 additions & 1 deletion tests/vagrant.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# test file
---
- hosts: all
- name: converge
hosts: all
remote_user: vagrant
become: true
pre_tasks:
Expand Down
3 changes: 3 additions & 0 deletions vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ percona_server_debconf_selections:
percona_server_dependencies_pre:
- software-properties-common
- dirmngr
- gpg-agent
- apt-transport-https
- debconf-utils

percona_server_dependencies:
- "percona-server-client{{ percona_server_version_deb }}"
Expand Down

0 comments on commit 79ba2d7

Please sign in to comment.