Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make work on Rocky Linux 9 #10

Merged
merged 6 commits into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
jobs:

list-scenarios:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
outputs:
matrix: ${{ steps.listscenarios.outputs.scenarios }}
steps:
Expand All @@ -22,7 +22,7 @@
name: Test
needs:
- list-scenarios
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
# Keep running so we can see if other tests pass
fail-fast: false
Expand All @@ -42,13 +42,13 @@
run: molecule test -s "${{ matrix.scenario }}"



Check failure on line 45 in .github/workflows/molecule.yml

View workflow job for this annotation

GitHub Actions / Test (default)

45:1 [empty-lines] too many blank lines (3 > 2)
publish:
name: Galaxy
if: startsWith(github.ref, 'refs/tags')
needs:
- test
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: galaxy
uses: ome/action-ansible-galaxy-publish@main
Expand Down
4 changes: 2 additions & 2 deletions meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ galaxy_info:
platforms:
- name: EL
versions:
- 7
- 9
- name: Ubuntu
versions:
- xenial
- jammy
namespace: ome
galaxy_tags: []

Expand Down
14 changes: 0 additions & 14 deletions molecule/default/Dockerfile.j2

This file was deleted.

19 changes: 19 additions & 0 deletions molecule/default/destroy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
- name: Destroy molecule containers

Check warning on line 1 in molecule/default/destroy.yml

View workflow job for this annotation

GitHub Actions / Test (default)

1:1 [document-start] missing document start "---"
hosts: molecule
gather_facts: false
tasks:
- name: Stop and remove container
delegate_to: localhost
community.docker.docker_container:
name: "{{ inventory_hostname }}"
state: absent
auto_remove: true

- name: Remove dynamic molecule inventory
hosts: localhost
gather_facts: false
tasks:
- name: Remove dynamic inventory file
ansible.builtin.file:
path: "{{ molecule_ephemeral_directory }}/inventory/molecule_inventory.yml"

Check failure on line 18 in molecule/default/destroy.yml

View workflow job for this annotation

GitHub Actions / Test (default)

18:81 [line-length] line too long (83 > 80 characters)
state: absent
7 changes: 6 additions & 1 deletion molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,15 @@ lint: |
flake8
platforms:
- name: nfs-mount
image: centos/systemd
image: eniocarboni/docker-rockylinux-systemd:9
image_version: latest
command: /sbin/init
privileged: true
cgroupns_mode: host
tmpfs:
- /sys/fs/cgroup
groups:
- extra_options
volumes:
# This allows NFS exports to work on Docker
- "nfs-share-rw:/srv"
Expand Down
4 changes: 2 additions & 2 deletions molecule/default/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@

roles:

- role: ome.nfs_share
- role: nfs_share

Check failure on line 24 in molecule/default/playbook.yml

View workflow job for this annotation

GitHub Actions / Test (default)

syntax-check[specific]

the role 'nfs_share' was not found in /home/runner/work/ansible-role-nfs-mount/ansible-role-nfs-mount/molecule/default/roles:/home/runner/.cache/ansible-compat/69820a/roles:/home/runner/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:/home/runner/work/ansible-role-nfs-mount/ansible-role-nfs-mount/molecule/default
nfs_shares:
/srv:
- host: "*"
options: "rw,fsid=0"

- role: ansible-role-nfs-mount
- role: nfs_mount
nfs_share_mounts:
- path: /mnt/rw
location: localhost:/share
Expand Down
7 changes: 6 additions & 1 deletion molecule/default/requirements.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
---
- src: ome.nfs_share
- name: nfs_share
src: https://github.com/pwalczysko/ansible-role-nfs-share/
version: Rocky9
- name: nfs_mount
src: https://github.com/pwalczysko/ansible-role-nfs-mount/
version: Rocky9
6 changes: 4 additions & 2 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@

- name: Install NFS mount utility
become: true
yum:
ansible.builtin.dnf:
update_cache: true
name: nfs-utils
state: present
when: ansible_os_family == "RedHat"

- name: Install NFS mount utility
become: true
apt:
ansible.builtin.apt:
update_cache: true
pkg: nfs-common
state: present
when: ansible_os_family == "Debian"
Expand Down
Loading