Revive the role

Update the role to Leap 15.3 and 15.4 and switch the molecule test from
using foreign images to building the test images using custom
Dockerfiles.
This commit is contained in:
Felix Niederwanger 2022-06-27 15:30:31 +02:00
parent 179a54125b
commit 88b1306386
Signed by: phoenix
GPG key ID: 31860289A704FB3C
8 changed files with 51 additions and 9 deletions

View file

@ -2,6 +2,8 @@
galaxy_info:
author: Felix Niederwanger
role_name: pureftpd
namespace: geekoops
description: Install and configure PureFTPd
company: SUSE
# issue_tracker_url: http://example.com/issue/tracker
@ -13,7 +15,8 @@ galaxy_info:
platforms:
- name: opensuse
versions:
- 15.2
- 15.3
- 15.4
galaxy_tags: ['ftp']

View file

@ -0,0 +1,7 @@
FROM registry.opensuse.org/opensuse/leap:15.3
# Install systemd and development tools, clear cache
RUN zypper in -y systemd systemd-sysvinit firewalld python3 python3-firewall curl && rm -rf /var/cache/*
# Start container with systemd
ENTRYPOINT ["/usr/sbin/init"]

View file

@ -0,0 +1,7 @@
FROM registry.opensuse.org/opensuse/leap:15.4
# Install systemd and development tools, clear cache
RUN zypper in -y systemd systemd-sysvinit firewalld python3 python3-firewall curl && rm -rf /var/cache/*
# Start container with systemd
ENTRYPOINT ["/usr/sbin/init"]

View file

@ -6,6 +6,11 @@
include_role:
name: "geekoops-pureftpd"
## Setup test enviroment
- name: Enable firewall
systemd:
name: firewalld
state: started
enabled: true
# Test file 1 is accessible (0754), test file 2 not (0750)
- name: Deploy test file
copy:

View file

@ -4,14 +4,23 @@ dependency:
driver:
name: docker
platforms:
- name: leap15_2
image: grisu48/leap-ansible
pre_build_image: true
- name: leap15_3
image: registry.opensuse.org/opensuse/leap:15.3
dockerfile: Dockerfile.leap15_3
command: ${MOLECULE_DOCKER_COMMAND:-"/usr/sbin/init"}
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
capabilities:
- SYS_ADMIN
tmpfs:
- /run
- /tmp
- name: leap15_4
image: registry.opensuse.org/opensuse/leap:15.4
dockerfile: Dockerfile.leap15_4
command: ${MOLECULE_DOCKER_COMMAND:-"/usr/sbin/init"}
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
tmpfs:
- /run
- /tmp
@ -19,8 +28,12 @@ provisioner:
name: ansible
inventory:
host_vars:
leap15_2:
leap15_3:
ftp_dir: "/srv/ftp"
config_firewall: true
leap15_4:
ftp_dir: "/srv/ftp"
config_firewall: true
verifier:
name: testinfra
lint:

View file

@ -20,6 +20,7 @@
group: root
mode: 0744
notify: restart pureftpd
tags: ['ftp']
- name: Ensure PureFTPd service is started and enabled
systemd:
name: "{{pureftpd_service}}"
@ -27,5 +28,5 @@
enabled: true
tags: ['ftp', 'systemd']
- include: firewall.yml
- include_tasks: firewall.yml
when: config_firewall == true

View file

@ -1,5 +1,5 @@
---
# openSUSE Leap 15.2 specific variables
# openSUSE Leap 15.3 specific variables
## Software packages

View file

@ -0,0 +1,6 @@
---
# openSUSE Leap 15.4 specific variables
## Software packages
packages: ['pure-ftpd']