Skip to content
Draft
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
1 change: 1 addition & 0 deletions .github/workflows/ansible-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ jobs:
# demote var-naming[no-role-prefix] to warnings, as we only have a single role,
# and prefixing all variables in that role with the role name is really ugly
args: "--warn-list var-naming[no-role-prefix]"
requirements_file: "ansible/galaxy-requirements.yml"
2 changes: 1 addition & 1 deletion .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: SARIF file
path: results.sarif
Expand Down
8 changes: 8 additions & 0 deletions ansible/galaxy-requirements.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#
# Install roles and collections from the default Ansible Galaxy server.
#
---
collections:
- name: community.general
version: '>=10.7.3'
...
6 changes: 3 additions & 3 deletions ansible/playbooks/roles/compatibility_layer/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
# Defaults file for the compatibility layer role.
---
eessi_version: "2025.06"

Check warning on line 3 in ansible/playbooks/roles/compatibility_layer/defaults/main.yml

View workflow job for this annotation

GitHub Actions / ansible-lint

var-naming[no-role-prefix]

Variables names from within roles should use compatibility_layer_ as a prefix. (vars: eessi_version)

custom_overlays:

Check warning on line 5 in ansible/playbooks/roles/compatibility_layer/defaults/main.yml

View workflow job for this annotation

GitHub Actions / ansible-lint

var-naming[no-role-prefix]

Variables names from within roles should use compatibility_layer_ as a prefix. (vars: custom_overlays)
- name: eessi
source: git
url: https://github.com/EESSI/gentoo-overlay.git
eclass-overrides: true

cvmfs_repository: software.eessi.io

Check warning on line 11 in ansible/playbooks/roles/compatibility_layer/defaults/main.yml

View workflow job for this annotation

GitHub Actions / ansible-lint

var-naming[no-role-prefix]

Variables names from within roles should use compatibility_layer_ as a prefix. (vars: cvmfs_repository)

gentoo_prefix_path: /cvmfs/{{ cvmfs_repository }}/versions/{{ eessi_version }}/compat/{{ eessi_host_os }}/{{ eessi_host_arch }}

Check warning on line 13 in ansible/playbooks/roles/compatibility_layer/defaults/main.yml

View workflow job for this annotation

GitHub Actions / ansible-lint

var-naming[no-role-prefix]

Variables names from within roles should use compatibility_layer_ as a prefix. (vars: gentoo_prefix_path)

# How to build the prefix.
gentoo_git_repo: https://github.com/gentoo/gentoo.git

Check warning on line 16 in ansible/playbooks/roles/compatibility_layer/defaults/main.yml

View workflow job for this annotation

GitHub Actions / ansible-lint

var-naming[no-role-prefix]

Variables names from within roles should use compatibility_layer_ as a prefix. (vars: gentoo_git_repo)
# Select a specific commit in the gentoo_git_repo that should be used for the bootstrap,
# e.g. by checking: https://github.com/gentoo/gentoo/commits/master
# June 7 2025 (083e38cef302128d595e9f9cfd029ad8f67ec2b7) commit that includes Lmod 8.7.60 and glibc 2.41
gentoo_git_commit: 083e38cef302128d595e9f9cfd029ad8f67ec2b7

Check warning on line 20 in ansible/playbooks/roles/compatibility_layer/defaults/main.yml

View workflow job for this annotation

GitHub Actions / ansible-lint

var-naming[no-role-prefix]

Variables names from within roles should use compatibility_layer_ as a prefix. (vars: gentoo_git_commit)
prefix_required_space: 15 GB

Check warning on line 21 in ansible/playbooks/roles/compatibility_layer/defaults/main.yml

View workflow job for this annotation

GitHub Actions / ansible-lint

var-naming[no-role-prefix]

Variables names from within roles should use compatibility_layer_ as a prefix. (vars: prefix_required_space)
prefix_user_defined_trusted_dirs:

Check warning on line 22 in ansible/playbooks/roles/compatibility_layer/defaults/main.yml

View workflow job for this annotation

GitHub Actions / ansible-lint

var-naming[no-role-prefix]

Variables names from within roles should use compatibility_layer_ as a prefix. (vars: prefix_user_defined_trusted_dirs)
- "/cvmfs/{{ cvmfs_repository }}/host_injections/{{ eessi_version }}/compat/{{ eessi_host_os }}/{{ eessi_host_arch }}/lib/override"
- "/cvmfs/{{ cvmfs_repository }}/host_injections/{{ eessi_version }}/compat/{{ eessi_host_os }}/{{ eessi_host_arch }}/lib/nvidia"
- "/cvmfs/{{ cvmfs_repository }}/host_injections/{{ eessi_version }}/compat/{{ eessi_host_os }}/{{ eessi_host_arch }}/lib/amd"
- "/cvmfs/{{ cvmfs_repository }}/versions/{{ eessi_version }}/compat/{{ eessi_host_os }}/{{ eessi_host_arch }}/lib/override"
- "/cvmfs/{{ cvmfs_repository }}/versions/{{ eessi_version }}/compat/{{ eessi_host_os }}/{{ eessi_host_arch }}/lib/nvidia"
- "/cvmfs/{{ cvmfs_repository }}/versions/{{ eessi_version }}/compat/{{ eessi_host_os }}/{{ eessi_host_arch }}/lib/amd"
prefix_mask_packages: |

Check warning on line 26 in ansible/playbooks/roles/compatibility_layer/defaults/main.yml

View workflow job for this annotation

GitHub Actions / ansible-lint

var-naming[no-role-prefix]

Variables names from within roles should use compatibility_layer_ as a prefix. (vars: prefix_mask_packages)
# stick to GCC 13.x; using a too recent compiler in the compat layer may complicate stuff in the software layer,
# see for example https://github.com/EESSI/software-layer/issues/151
>=sys-devel/gcc-14
prefix_unmask_packages: |

Check warning on line 30 in ansible/playbooks/roles/compatibility_layer/defaults/main.yml

View workflow job for this annotation

GitHub Actions / ansible-lint

var-naming[no-role-prefix]

Variables names from within roles should use compatibility_layer_ as a prefix. (vars: prefix_unmask_packages)
# if necessary, unmask for instance an older GCC to make it installable
prefix_bootstrap_use_flags: |
# only build libnss, don't build the daemon (use the one from the host)
Expand Down
5 changes: 5 additions & 0 deletions ansible/playbooks/roles/compatibility_layer/handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@
- name: Generate locales
ansible.builtin.command: locale-gen
changed_when: true

- name: Sync overlays
community.general.portage:
sync: 'yes'
verbose: true
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
dest: "{{ gentoo_prefix_path }}/etc/portage/repos.conf/{{ item.name }}.conf"
mode: "0644"
loop: "{{ custom_overlays }}"
notify: Sync overlays

- name: Make configuration file with overlays that can override eclasses
ansible.builtin.copy:
Expand All @@ -29,10 +30,8 @@
selectattr('eclass-overrides', 'equalto', True) | map(attribute='name') | join(' ')
}}

- name: Sync the repositories
community.general.portage:
sync: 'yes'
verbose: true
- name: Flush handlers to make sure that overlays are synced
ansible.builtin.meta: flush_handlers

- name: Find all files and directories in the etc/portage directory of the overlay
ansible.builtin.find:
Expand Down
Loading