Skip to content

Commit e2e0195

Browse files
author
jsf9k
committed
# Conflicts: # .github/workflows/build.yml # meta/main.yml
2 parents f9dac0a + 54e395e commit e2e0195

File tree

5 files changed

+157
-42
lines changed

5 files changed

+157
-42
lines changed

.config/molecule/config.yml

Lines changed: 4 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -112,42 +112,6 @@ platforms:
112112
privileged: true
113113
volumes:
114114
- /sys/fs/cgroup:/sys/fs/cgroup:rw
115-
- cgroupns_mode: host
116-
command: /lib/systemd/systemd
117-
image: docker.io/geerlingguy/docker-fedora39-ansible:latest
118-
name: fedora39-systemd-amd64
119-
platform: amd64
120-
pre_build_image: true
121-
privileged: true
122-
volumes:
123-
- /sys/fs/cgroup:/sys/fs/cgroup:rw
124-
- cgroupns_mode: host
125-
command: /lib/systemd/systemd
126-
image: docker.io/geerlingguy/docker-fedora39-ansible:latest
127-
name: fedora39-systemd-arm64
128-
platform: arm64
129-
pre_build_image: true
130-
privileged: true
131-
volumes:
132-
- /sys/fs/cgroup:/sys/fs/cgroup:rw
133-
- cgroupns_mode: host
134-
command: /lib/systemd/systemd
135-
image: docker.io/geerlingguy/docker-fedora40-ansible:latest
136-
name: fedora40-systemd-amd64
137-
platform: amd64
138-
pre_build_image: true
139-
privileged: true
140-
volumes:
141-
- /sys/fs/cgroup:/sys/fs/cgroup:rw
142-
- cgroupns_mode: host
143-
command: /lib/systemd/systemd
144-
image: docker.io/geerlingguy/docker-fedora40-ansible:latest
145-
name: fedora40-systemd-arm64
146-
platform: arm64
147-
pre_build_image: true
148-
privileged: true
149-
volumes:
150-
- /sys/fs/cgroup:/sys/fs/cgroup:rw
151115
- cgroupns_mode: host
152116
command: /lib/systemd/systemd
153117
image: docker.io/geerlingguy/docker-fedora41-ansible:latest
@@ -168,17 +132,17 @@ platforms:
168132
- /sys/fs/cgroup:/sys/fs/cgroup:rw
169133
- cgroupns_mode: host
170134
command: /lib/systemd/systemd
171-
image: docker.io/geerlingguy/docker-ubuntu2004-ansible:latest
172-
name: ubuntu-20-systemd-amd64
135+
image: docker.io/geerlingguy/docker-fedora42-ansible:latest
136+
name: fedora42-systemd-amd64
173137
platform: amd64
174138
pre_build_image: true
175139
privileged: true
176140
volumes:
177141
- /sys/fs/cgroup:/sys/fs/cgroup:rw
178142
- cgroupns_mode: host
179143
command: /lib/systemd/systemd
180-
image: docker.io/geerlingguy/docker-ubuntu2004-ansible:latest
181-
name: ubuntu-20-systemd-arm64
144+
image: docker.io/geerlingguy/docker-fedora42-ansible:latest
145+
name: fedora42-systemd-arm64
182146
platform: arm64
183147
pre_build_image: true
184148
privileged: true

.github/workflows/build.yml

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,3 +200,110 @@ jobs:
200200
- name: Setup tmate debug session
201201
uses: mxschmitt/action-tmate@v3
202202
if: env.RUN_TMATE
203+
<<<<<<< HEAD
204+
=======
205+
test:
206+
name: >-
207+
test (${{ matrix.scenario }}) -
208+
${{ matrix.platform }}-${{ matrix.architecture }}
209+
needs:
210+
- diagnostics
211+
permissions:
212+
# actions/checkout needs this to fetch code
213+
contents: read
214+
# This line is long, but if I use a block style indicator then GH
215+
# Actions doesn't parse and execute the expression.
216+
# yamllint disable-line rule:line-length
217+
runs-on: ubuntu-${{ startsWith(matrix.architecture, 'arm') && '24.04-arm' || 'latest' }}
218+
strategy:
219+
fail-fast: false
220+
matrix:
221+
architecture:
222+
- amd64
223+
- arm64
224+
platform:
225+
- amazonlinux2023-systemd
226+
- debian10-systemd
227+
- debian11-systemd
228+
- debian12-systemd
229+
- debian13-systemd
230+
- fedora41-systemd
231+
- fedora42-systemd
232+
- kali-systemd
233+
- ubuntu-22-systemd
234+
- ubuntu-24-systemd
235+
scenario:
236+
- default
237+
steps:
238+
- name: Apply standard cisagov job preamble
239+
uses: cisagov/action-job-preamble@v1
240+
with:
241+
# This functionality is poorly implemented and has been
242+
# causing problems due to the MITM implementation hogging or
243+
# leaking memory. As a result we disable it by default. If
244+
# you want to temporarily enable it, simply set
245+
# monitor_permissions equal to "true".
246+
#
247+
# TODO: Re-enable this functionality when practical. See
248+
# cisagov/skeleton-ansible-role#227 for more details.
249+
monitor_permissions: "false"
250+
# Use a variable to specify the permissions monitoring
251+
# configuration. By default this will yield the
252+
# configuration stored in the cisagov organization-level
253+
# variable, but if you want to use a different configuration
254+
# then simply:
255+
# 1. Create a repository-level variable with the name
256+
# ACTIONS_PERMISSIONS_CONFIG.
257+
# 2. Set this new variable's value to the configuration you
258+
# want to use for this repository.
259+
#
260+
# Note in particular that changing the permissions
261+
# monitoring configuration *does not* require you to modify
262+
# this workflow.
263+
permissions_monitoring_config: ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}
264+
- id: setup-env
265+
uses: cisagov/setup-env-github-action@develop
266+
- uses: actions/checkout@v4
267+
- id: setup-python
268+
uses: actions/setup-python@v5
269+
with:
270+
python-version: ${{ steps.setup-env.outputs.python-version }}
271+
- uses: actions/cache@v4
272+
env:
273+
BASE_CACHE_KEY: ${{ github.job }}-${{ runner.os }}-\
274+
py${{ steps.setup-python.outputs.python-version }}-
275+
with:
276+
path: ${{ env.PIP_CACHE_DIR }}
277+
key: ${{ env.BASE_CACHE_KEY }}\
278+
${{ hashFiles('**/requirements-test.txt') }}-\
279+
${{ hashFiles('**/requirements.txt') }}
280+
restore-keys: |
281+
${{ env.BASE_CACHE_KEY }}
282+
- name: Install dependencies
283+
run: |
284+
python -m pip install --upgrade pip
285+
pip install --upgrade --requirement requirements-test.txt
286+
- name: Set up Docker Buildx
287+
uses: docker/setup-buildx-action@v3
288+
# AppArmor interferes when running Molecule tests against Fedora
289+
# 40 and 41; it does not allow the privileged container to run
290+
# sudo and hence Ansible is unable to do anything. See
291+
# fedora-cloud/docker-brew-fedora#117 for more details.
292+
#
293+
# There is a growing consensus that AppArmor causes too many
294+
# problems and should not be active on the short-lived GitHub
295+
# runners. See, for example,
296+
# actions/runner-images/issues/10015. To avoid problems in the
297+
# future, it makes sense to simply disable AppArmor altogether
298+
# before running Molecule tests.
299+
- name: Disable AppArmor
300+
uses: cisagov/action-disable-apparmor@v1
301+
- name: Run molecule tests
302+
run: >-
303+
molecule test
304+
--platform-name ${{ matrix.platform }}-${{ matrix.architecture }}
305+
--scenario-name ${{ matrix.scenario }}
306+
- name: Setup tmate debug session
307+
uses: mxschmitt/action-tmate@v3
308+
if: env.RUN_TMATE
309+
>>>>>>> 54e395efa2409780c0574d266fe68bce1c9b7060

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ repos:
170170

171171
# Ansible hooks
172172
- repo: https://github.com/ansible/ansible-lint
173-
rev: v25.1.3
173+
rev: v25.4.0
174174
hooks:
175175
- id: ansible-lint
176176
additional_dependencies:

meta/main.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
# Note that dependencies listed here are automatically installed
3+
# before this role. Role variables for any roles listed here can be
4+
# assigned static variables.
5+
#
6+
# See also cisagov/skeleton-ansible-role#153.
7+
dependencies: []
8+
galaxy_info:
9+
author: First Last
10+
company: CISA Cyber Assessments
11+
description: Skeleton Ansible role
12+
galaxy_tags:
13+
- skeleton
14+
license: CC0-1.0
15+
# With the release of version 2.10, Ansible finally correctly
16+
# identifies Kali Linux as being the Kali distribution of the Debian
17+
# OS family. This simplifies a lot of things for roles that support
18+
# Kali Linux, so it makes sense to force the installation of Ansible
19+
# 2.10 or newer.
20+
min_ansible_version: "2.10"
21+
namespace: cisagov
22+
platforms:
23+
- name: Amazon Linux
24+
versions:
25+
- "2023"
26+
- name: Debian
27+
versions:
28+
- buster
29+
- bullseye
30+
- bookworm
31+
- trixie
32+
- name: Fedora
33+
versions:
34+
- "41"
35+
- "42"
36+
- name: Kali
37+
versions:
38+
- "2023"
39+
- name: Ubuntu
40+
versions:
41+
- jammy
42+
- noble
43+
role_name: skeleton
44+
standalone: true

version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.0
1+
2.0.0

0 commit comments

Comments
 (0)