test: add support debian 11
This commit is contained in:
parent
51fbef2480
commit
03dcb51ea1
8 changed files with 38 additions and 14 deletions
molecule/default
|
@ -1,6 +1,8 @@
|
|||
---
|
||||
- name: Converge
|
||||
hosts: all
|
||||
roles:
|
||||
- ansible-role-mariadb
|
||||
vars:
|
||||
mariadb_password: secret
|
||||
mariadb_autorestart: yes
|
||||
|
@ -19,5 +21,8 @@
|
|||
password: test
|
||||
privileges:
|
||||
- 'test.*:ALL'
|
||||
roles:
|
||||
- ansible-role-mariadb
|
||||
|
||||
pre_tasks:
|
||||
- name: update apt cache
|
||||
ansible.builtin.apt:
|
||||
update_cache: true
|
||||
|
|
|
@ -2,17 +2,22 @@
|
|||
driver:
|
||||
name: docker
|
||||
platforms:
|
||||
- name: debian10
|
||||
image: nishiki/debian10:molecule
|
||||
- name: debian11
|
||||
image: nishiki/debian11:molecule
|
||||
privileged: true
|
||||
volumes:
|
||||
- /sys/fs/cgroup:/sys/fs/cgroup:ro
|
||||
command: /bin/systemd
|
||||
capabilities:
|
||||
- SYS_ADMIN
|
||||
provisioner:
|
||||
inventory:
|
||||
host_vars:
|
||||
debian11:
|
||||
mariadb_use_official_repository: yes
|
||||
lint: |
|
||||
set -e
|
||||
yamllint .
|
||||
ansible-lint
|
||||
ansible-lint .
|
||||
verifier:
|
||||
name: testinfra
|
||||
|
|
|
@ -2,7 +2,7 @@ import os, re
|
|||
import testinfra.utils.ansible_runner
|
||||
|
||||
def test_packages(host):
|
||||
for package_name in ['mariadb-server', 'python-mysqldb']:
|
||||
for package_name in ['mariadb-server', 'python3-mysqldb']:
|
||||
package = host.package(package_name)
|
||||
assert package.is_installed
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue