Merge pull request #2 from GeekOops/revive

Revive the role
This commit is contained in:
Felix Niederwanger 2022-06-27 16:25:34 +02:00 committed by GitHub
commit 075dc4391f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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']