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

Updates for modern ansible #3

Merged
merged 8 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
26 changes: 13 additions & 13 deletions .github/workflows/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,15 @@ on:
pull_request:
branches:
- master
schedule:
- cron: '5 4 */14 * *' # Twice / month, at 4:05 AM.

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: "${{ github.repository }}"
- name: molecule
Expand All @@ -26,21 +29,18 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
image:
- geerlingguy/docker-ubuntu2004-ansible:latest
- geerlingguy/docker-ubuntu1804-ansible:latest
- geerlingguy/docker-ubuntu1604-ansible:latest
- geerlingguy/docker-centos8-ansible:latest
- geerlingguy/docker-centos7-ansible:latest
config:
- image: "ubuntu"
tag: "latest" # latest == noble, as of this writing.
- image: "ubuntu"
tag: "jammy"
steps:
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: "${{ github.repository }}"
- name: molecule
uses: robertdebock/molecule-action@2.6.3
uses: robertdebock/molecule-action@6.0.1
with:
image: "${{ matrix.image }}"
options: parallel
env:
MOLECULE_DOCKER_IMAGE: "${{ matrix.image }}"
image: ${{ matrix.config.image }}
tag: ${{ matrix.config.tag }}
4 changes: 4 additions & 0 deletions handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@
service:
name: rsyslog
state: restarted

- name: ards systemctl daemon-reexec
ansible.builtin.systemd:
daemon_reexec: true
9 changes: 7 additions & 2 deletions meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,17 @@ galaxy_info:
description: Support logging to a specific file when using the syslog module on a Drupal site
company: Acro Media Inc.
license: GPLv3
min_ansible_version: 2.5
min_ansible_version: 2.6
platforms:
- name: Ubuntu
versions:
- 16.04
- xenial
- bionic
- focal
- jammy
- noble
- name: EL
versions:
- 6
galaxy_tags: []
dependencies: []
20 changes: 14 additions & 6 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,28 @@
---
role_name_check: 1
dependency:
name: galaxy
options:
role-file: requirements.yml
requirements-file: requirements.yml
driver:
name: docker
platforms:
- name: instance
image: ${MOLECULE_DOCKER_IMAGE:-'geerlingguy/docker-ubuntu1804-ansible:latest'}
command: ${MOLECULE_DOCKER_COMMAND:-""}
- name: "drupal-syslog-${image:-ubuntu}-${tag:-latest}${TOX_ENVNAME}"
image: "${namespace:-robertdebock}/${image:-ubuntu}:${tag:-latest}"
command: /sbin/init
cgroupns_mode: host
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- /sys/fs/cgroup:/sys/fs/cgroup:rw
privileged: true
pre_build_image: true
tmpfs:
- /tmp
- /run
- /run/lock
provisioner:
name: ansible
playbooks:
converge: ${MOLECULE_PLAYBOOK:-converge.yml}
config_options:
defaults:
verbosity: ${MOLECULE_VERBOSITY:-0}
remote_tmp: /tmp
6 changes: 6 additions & 0 deletions molecule/default/prepare.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- name: Bootstrap
hosts: all
become: true
gather_facts: false
roles:
- role: robertdebock.bootstrap
3 changes: 3 additions & 0 deletions requirements.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
roles:
- name: robertdebock.bootstrap
2 changes: 1 addition & 1 deletion tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
- name: "Set some os-specific facts"
include: "{{ ansible_os_family }}.yml"
include_tasks: "{{ ansible_os_family }}.yml"
tags:
- always

Expand Down