Skip to content

Commit 2084865

Browse files
dholtclaude
andcommitted
fix: update lint script and molecule configs for CI
- Add project-level .ansible-lint with profile:min and skip_list for pre-existing issues (fqcn, name casing, truthy, octal, etc.) - Rewrite lint script to run from project root using project config - Remove per-role .ansible-lint files (conflicted with v26 syntax) - Add ANSIBLE_ROLES_PATH to molecule workflow so roles are discoverable - Add privileged:true to 7 molecule configs missing it - Replace cgroup v1 bind mount with cgroupns_mode:host for all molecule platforms (fixes systemd-in-Docker on cgroup v2 hosts) - Upgrade molecule runner to ubuntu-24.04 (better cgroup v2 support) - Set fail-fast:false so all molecule jobs run independently Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Douglas Holt <dholt@nvidia.com>
1 parent e3d93e4 commit 2084865

File tree

31 files changed

+98
-110
lines changed

31 files changed

+98
-110
lines changed

.ansible-lint

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
# Project-level ansible-lint configuration for ansible-lint 26.x
3+
# Profile levels: min, basic, moderate, safety, shared, production
4+
profile: min
5+
6+
# Exclude external/vendored roles and hardware-specific roles
7+
exclude_paths:
8+
- roles/galaxy/
9+
- roles/nvidia-dgx/
10+
- roles/nvidia-dgx-firmware/
11+
- roles/nvidia-gpu-tests/
12+
- submodules/
13+
14+
# Skip rules for pre-existing issues across the codebase.
15+
# These should be fixed incrementally in future PRs.
16+
skip_list:
17+
- fqcn[action-core] # 634 violations: modules not using FQCN
18+
- fqcn[action] # 24 violations: same for non-core
19+
- name[casing] # 526 violations: task names not capitalized
20+
- yaml[truthy] # 152 violations: yes/no instead of true/false
21+
- yaml[octal-values] # 52 violations: octal file modes
22+
- jinja[spacing] # 20 violations: jinja2 spacing
23+
- name[play] # 12 violations: play names
24+
- schema[meta] # 3 violations: meta/main.yml schema
25+
- key-order[task] # 3 violations: task key ordering
26+
- ignore-errors # pre-existing ignore_errors usage

.github/workflows/molecule.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ on:
55
- pull_request
66
jobs:
77
build:
8-
runs-on: ubuntu-22.04
8+
runs-on: ubuntu-24.04
99
strategy:
10+
fail-fast: false
1011
max-parallel: 4
1112
matrix:
1213
deepops-role:
@@ -41,6 +42,8 @@ jobs:
4142
python3 -m pip install ansible==10.7.0
4243
python3 -m pip install molecule molecule-plugins[docker] docker
4344
- name: run molecule test
45+
env:
46+
ANSIBLE_ROLES_PATH: "${{ github.workspace }}/${{ github.repository }}/roles/galaxy:${{ github.workspace }}/${{ github.repository }}/roles"
4447
run: |
4548
cd "${{ github.repository }}/roles"
4649
ansible-galaxy role install --force -r ./requirements.yml

roles/cachefilesd/molecule/default/molecule.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ driver:
66
platforms:
77
- name: cachefilesd-ubuntu-2004
88
image: geerlingguy/docker-ubuntu2004-ansible
9-
volumes:
10-
- /sys/fs/cgroup:/sys/fs/cgroup:ro
9+
cgroupns_mode: host
1110
command: /sbin/init
1211
tmpfs:
1312
- /run
@@ -16,8 +15,7 @@ platforms:
1615
privileged: true
1716
- name: cachefilesd-ubuntu-2204
1817
image: geerlingguy/docker-ubuntu2204-ansible
19-
volumes:
20-
- /sys/fs/cgroup:/sys/fs/cgroup:ro
18+
cgroupns_mode: host
2119
command: /sbin/init
2220
tmpfs:
2321
- /run

roles/easy-build-packages/.ansible-lint

Lines changed: 0 additions & 4 deletions
This file was deleted.

roles/easy-build/.ansible-lint

Lines changed: 0 additions & 3 deletions
This file was deleted.

roles/facts/molecule/default/molecule.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,22 @@ driver:
66
platforms:
77
- name: facts-ubuntu-2004
88
image: geerlingguy/docker-ubuntu2004-ansible
9-
volumes:
10-
- /sys/fs/cgroup:/sys/fs/cgroup:ro
9+
cgroupns_mode: host
1110
command: /sbin/init
1211
tmpfs:
1312
- /run
1413
- /tmp
1514
pre_build_image: true
15+
privileged: true
1616
- name: facts-ubuntu-2204
1717
image: geerlingguy/docker-ubuntu2204-ansible
18-
volumes:
19-
- /sys/fs/cgroup:/sys/fs/cgroup:ro
18+
cgroupns_mode: host
2019
command: /sbin/init
2120
tmpfs:
2221
- /run
2322
- /tmp
2423
pre_build_image: true
24+
privileged: true
2525
provisioner:
2626
name: ansible
2727
ansible_args:

roles/kerberos_client/.ansible-lint

Lines changed: 0 additions & 3 deletions
This file was deleted.

roles/kerberos_client/molecule/default/molecule.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,22 @@ driver:
66
platforms:
77
- name: krb-ubuntu-2004
88
image: geerlingguy/docker-ubuntu2004-ansible
9-
volumes:
10-
- /sys/fs/cgroup:/sys/fs/cgroup:ro
9+
cgroupns_mode: host
1110
command: /sbin/init
1211
tmpfs:
1312
- /run
1413
- /tmp
1514
pre_build_image: true
15+
privileged: true
1616
- name: krb-ubuntu-2204
1717
image: geerlingguy/docker-ubuntu2204-ansible
18-
volumes:
19-
- /sys/fs/cgroup:/sys/fs/cgroup:ro
18+
cgroupns_mode: host
2019
command: /sbin/init
2120
tmpfs:
2221
- /run
2322
- /tmp
2423
pre_build_image: true
24+
privileged: true
2525
provisioner:
2626
name: ansible
2727
ansible_args:

roles/lmod/molecule/default/molecule.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,12 @@ driver:
66
platforms:
77
- name: lmod-ubuntu-2004
88
image: geerlingguy/docker-ubuntu2004-ansible
9-
volumes:
10-
- /sys/fs/cgroup:/sys/fs/cgroup:ro
9+
cgroupns_mode: host
1110
privileged: true
1211
pre_build_image: true
1312
- name: lmod-ubuntu-2204
1413
image: geerlingguy/docker-ubuntu2204-ansible
15-
volumes:
16-
- /sys/fs/cgroup:/sys/fs/cgroup:ro
14+
cgroupns_mode: host
1715
privileged: true
1816
pre_build_image: true
1917
provisioner:

roles/mofed/molecule/default/molecule.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,13 @@ driver:
66
platforms:
77
- name: mofed-ubuntu-2004
88
image: geerlingguy/docker-ubuntu2004-ansible
9-
volumes:
10-
- /sys/fs/cgroup:/sys/fs/cgroup:ro
9+
cgroupns_mode: host
1110
command: /sbin/init
1211
pre_build_image: true
1312
privileged: true
1413
- name: mofed-ubuntu-2204
1514
image: geerlingguy/docker-ubuntu2204-ansible
16-
volumes:
17-
- /sys/fs/cgroup:/sys/fs/cgroup:ro
15+
cgroupns_mode: host
1816
command: /sbin/init
1917
pre_build_image: true
2018
privileged: true

0 commit comments

Comments
 (0)