Skip to content

Commit 3ff7663

Browse files
committed
remove pilot vars
2 parents 09823b7 + 7e437e4 commit 3ff7663

File tree

15 files changed

+166
-142
lines changed

15 files changed

+166
-142
lines changed

.github/workflows/ansible-lint.yml

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -11,51 +11,51 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
# Important: This sets up your GITHUB_WORKSPACE environment variable
15-
- name: checkout
16-
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
14+
# Important: This sets up your GITHUB_WORKSPACE environment variable
15+
- name: checkout
16+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1717

18-
- name: Lint Ansible Playbook
19-
# replace "master" with any valid ref
20-
uses: ansible/ansible-lint-action@27c37f9001153675ee6abcadcd722bcbdafaba08 # v6.8.2
21-
with:
22-
# [required]
23-
# Paths to ansible files (i.e., playbooks, tasks, handlers etc..)
24-
# or valid Ansible directories according to the Ansible role
25-
# directory structure.
26-
# If you want to lint multiple ansible files, use the following syntax
27-
# targets: |
28-
# playbook_1.yml
29-
# playbook_2.yml
30-
targets: "*.yml inventory/group_vars/*.yml"
31-
# [optional]
32-
# Arguments to override a package and its version to be set explicitly.
33-
# Must follow the example syntax.
34-
# stick to older version of rich, as the new one is not compatible (yet) with ansible-lint
35-
override-deps: |
36-
rich>=9.5.1,<11.0.0
37-
# ansible==2.9
38-
# ansible-lint==4.2.0
39-
# [optional]
40-
# Arguments to be passed to the ansible-lint
18+
- name: Lint Ansible Playbook
19+
# replace "master" with any valid ref
20+
uses: ansible/ansible-lint@4114ad63edbc25dcd9afc4f41b29dbcbebdf21ca # v25.5.0
21+
with:
22+
# [required]
23+
# Paths to ansible files (i.e., playbooks, tasks, handlers etc..)
24+
# or valid Ansible directories according to the Ansible role
25+
# directory structure.
26+
# If you want to lint multiple ansible files, use the following syntax
27+
# targets: |
28+
# playbook_1.yml
29+
# playbook_2.yml
30+
# targets: "*.yml inventory/group_vars/*.yml"
31+
# [optional]
32+
# Arguments to override a package and its version to be set explicitly.
33+
# Must follow the example syntax.
34+
# stick to older version of rich, as the new one is not compatible (yet) with ansible-lint
35+
# override-deps: |
36+
# rich>=9.5.1,<11.0.0
37+
# ansible==2.9
38+
# ansible-lint==4.2.0
39+
# [optional]
40+
# Arguments to be passed to the ansible-lint
4141

42-
# Options:
43-
# -q quieter, although not silent output
44-
# -p parseable output in the format of pep8
45-
# --parseable-severity parseable output including severity of rule
46-
# -r RULESDIR specify one or more rules directories using one or
47-
# more -r arguments. Any -r flags override the default
48-
# rules in ansiblelint/rules, unless -R is also used.
49-
# -R Use default rules in ansiblelint/rules in addition to
50-
# any extra
51-
# rules directories specified with -r. There is no need
52-
# to specify this if no -r flags are used
53-
# -t TAGS only check rules whose id/tags match these values
54-
# -x SKIP_LIST only check rules whose id/tags do not match these
55-
# values
56-
# --nocolor disable colored output
57-
# --exclude=EXCLUDE_PATHS
58-
# path to directories or files to skip. This option is
59-
# repeatable.
60-
# -c C Specify configuration file to use. Defaults to ".ansible-lint"
61-
args: ""
42+
# Options:
43+
# -q quieter, although not silent output
44+
# -p parseable output in the format of pep8
45+
# --parseable-severity parseable output including severity of rule
46+
# -r RULESDIR specify one or more rules directories using one or
47+
# more -r arguments. Any -r flags override the default
48+
# rules in ansiblelint/rules, unless -R is also used.
49+
# -R Use default rules in ansiblelint/rules in addition to
50+
# any extra
51+
# rules directories specified with -r. There is no need
52+
# to specify this if no -r flags are used
53+
# -t TAGS only check rules whose id/tags match these values
54+
# -x SKIP_LIST only check rules whose id/tags do not match these
55+
# values
56+
# --nocolor disable colored output
57+
# --exclude=EXCLUDE_PATHS
58+
# path to directories or files to skip. This option is
59+
# repeatable.
60+
# -c C Specify configuration file to use. Defaults to ".ansible-lint"
61+
args: ""

.github/workflows/build-publish-containers.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ permissions: read-all
2525
jobs:
2626
build_and_publish:
2727
name: Build and publish image
28-
#runs-on: self-hosted
28+
# runs-on: self-hosted
2929
runs-on: ubuntu-24.04-arm
3030
timeout-minutes: 720
3131
permissions:
@@ -77,7 +77,7 @@ jobs:
7777
echo DOCKERFILE=Dockerfile.EESSI-${tag//:/-} >> $GITHUB_ENV
7878
7979
- name: Build and push to GitHub Packages
80-
uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5 #v3.2.0
80+
uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5 # v3.2.0
8181
with:
8282
tags: ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }}-${{ matrix.platform }}
8383
file: containers/${{ env.DOCKERFILE }}

.github/workflows/build-test-release-client-packages.yml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,25 @@ jobs:
4949
uses: bpicode/github-action-fpm@7502b06a5a58390398d4002bd284f8cb3caae6eb
5050
with:
5151
fpm_args: "etc"
52-
fpm_opts: "--debug -n cvmfs-config-eessi -v ${{ steps.get_version.outputs.version }} -t rpm -a all -s dir -C ./package --description 'CVMFS configuration package for EESSI.'"
52+
fpm_opts: >
53+
--debug -n cvmfs-config-eessi -v ${{ steps.get_version.outputs.version }} -t rpm -a all -s dir
54+
-C ./package --description 'CVMFS configuration package for EESSI.'
5355
5456
- name: Build Deb package
5557
uses: bpicode/github-action-fpm@7502b06a5a58390398d4002bd284f8cb3caae6eb
5658
with:
5759
fpm_args: "etc"
58-
fpm_opts: "--debug -n cvmfs-config-eessi -v ${{ steps.get_version.outputs.version }} -t deb -a all -s dir -C ./package --description 'CVMFS configuration package for EESSI.'"
60+
fpm_opts: >
61+
--debug -n cvmfs-config-eessi -v ${{ steps.get_version.outputs.version }} -t deb -a all -s dir
62+
-C ./package --description 'CVMFS configuration package for EESSI.'
5963
6064
- name: Build tar package
6165
uses: bpicode/github-action-fpm@7502b06a5a58390398d4002bd284f8cb3caae6eb
6266
with:
6367
fpm_args: "etc"
64-
fpm_opts: "--debug -n cvmfs-config-eessi-${{ steps.get_version.outputs.version }} -t tar -a all -s dir -C ./package --description 'CVMFS configuration package for EESSI.'"
68+
fpm_opts: >
69+
--debug -n cvmfs-config-eessi-${{ steps.get_version.outputs.version }} -t tar -a all -s dir
70+
-C ./package --description 'CVMFS configuration package for EESSI.'
6571
6672
- name: Upload packages as build artifacts
6773
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
@@ -103,7 +109,9 @@ jobs:
103109
# run: gem install --no-document fpm
104110
#
105111
# - name: Build package
106-
# run: "fpm --debug -n cvmfs-config-eessi -v ${{ steps.get_version.outputs.version }} -t osxpkg -a all -s dir -C ./package --description 'CVMFS configuration package for EESSI.' etc"
112+
# run: >
113+
# fpm --debug -n cvmfs-config-eessi -v ${{ steps.get_version.outputs.version }} -t osxpkg -a all -s dir
114+
# -C ./package --description 'CVMFS configuration package for EESSI.' etc
107115
#
108116
# - name: Find filename of generated package
109117
# id: find_filename
@@ -192,7 +200,7 @@ jobs:
192200
run: echo "CVMFS_CLIENT_PROFILE=single" | tee /etc/cvmfs/default.local
193201

194202
- name: Mount the repositories
195-
#run: cvmfs_config setup
203+
# run: cvmfs_config setup
196204
run: mkdir -p /cvmfs/software.eessi.io && mount -t cvmfs software.eessi.io /cvmfs/software.eessi.io
197205

198206
- name: Test repository access
@@ -273,7 +281,7 @@ jobs:
273281
# run: ls /Users/Shared/cvmfs/software.eessi.io/
274282

275283
release:
276-
#needs: [build-linux-packages, build-macos-package, test-deb-package, test-rpm-package, test-macos-package, test-tar-package]
284+
# needs: [build-linux-packages, build-macos-package, test-deb-package, test-rpm-package, test-macos-package, test-tar-package]
277285
needs: [build-linux-packages, test-deb-package, test-rpm-package, test-tar-package]
278286
if: startsWith(github.ref, 'refs/tags/')
279287
runs-on: ubuntu-latest
@@ -351,8 +359,10 @@ jobs:
351359
tag: latest
352360
name: Filesystem Layer latest release
353361
body: |
354-
Filesystem Layer release ${{ steps.find_version.outputs.version }} (see: https://github.com/${{github.repository}}/releases/tag/${{ steps.find_version.outputs.version }})
362+
Filesystem Layer release ${{ steps.find_version.outputs.version }}
363+
(see: https://github.com/${{github.repository}}/releases/tag/${{ steps.find_version.outputs.version }})
355364
356-
This `latest` tag is a moving tag that is updated automatically for each release, and provides easy access to the latest `cvmfs-config-eessi` packages.
365+
This `latest` tag is a moving tag that is updated automatically for each release,
366+
and provides easy access to the latest `cvmfs-config-eessi` packages.
357367
files: ${{ steps.find_filenames.outputs.package_filenames }}
358368
gzip: false

.github/workflows/check-stratum-servers.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
- main
1010
schedule:
1111
# * is a special character in YAML so you have to quote this string
12-
- cron: '30 5 * * *'
12+
- cron: '30 5 * * *'
1313

1414
# Declare default permissions as read only.
1515
permissions: read-all
@@ -39,4 +39,4 @@ jobs:
3939
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
4040
SLACK_MESSAGE: ${{ env.STRATUM_ERRORS }}
4141
SLACK_COLOR: 'danger'
42-
SLACK_FOOTER:
42+
SLACK_FOOTER:

.github/workflows/test-playbooks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Test Ansible Playbooks
1+
name: Test Ansible Playbooks # noqa: syntax-check[specific]
22

33
on:
44
push:

prepare-client-packages.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@
99
package_source_dir: "{{ lookup('env', 'GITHUB_WORKSPACE') | default('/tmp', True) }}/package"
1010
tasks:
1111
- name: Check the number of defined domains (should be one!)
12-
fail:
12+
ansible.builtin.fail:
1313
msg: "Cannot build a client package when eessi_cvmfs_server_urls contains different domains"
1414
when: eessi_cvmfs_server_urls | selectattr('domain') | list | unique | count > 1
1515

1616
- name: Determine domain name
17-
set_fact:
17+
ansible.builtin.set_fact:
1818
eessi_domain: "{{ eessi_cvmfs_server_urls[0].domain }}"
1919

2020
- name: Create directory structure for the CVMFS config
21-
file:
21+
ansible.builtin.file:
2222
path: "{{ item }}"
2323
state: directory
24-
mode: 0775
24+
mode: "0775"
2525
with_items:
2626
- "{{ package_source_dir }}"
2727
- "{{ package_source_dir }}/etc"
@@ -31,17 +31,17 @@
3131
- "{{ package_source_dir }}/etc/cvmfs/domain.d"
3232

3333
- name: Make EESSI CVMFS public key files
34-
copy:
34+
ansible.builtin.copy:
3535
content: "{{ item.key }}"
3636
dest: "{{ package_source_dir }}{{ item.path }}"
37-
mode: 0644
37+
mode: "0644"
3838
with_items: "{{ eessi_cvmfs_keys }}"
3939

4040
- name: Make EESSI CVMFS domain configuration file
41-
copy:
41+
ansible.builtin.copy:
4242
content: |
4343
# Stratum 1 servers for the eessi.io domain
44-
CVMFS_SERVER_URL="{{ item.urls|join(';') }}"
44+
CVMFS_SERVER_URL="{{ item.urls | join(';') }}"
4545
4646
# Public keys for the eessi.io domain
4747
CVMFS_KEYS_DIR="/etc/cvmfs/keys/{{ item.domain }}"
@@ -59,5 +59,5 @@
5959
fi
6060
6161
dest: "{{ package_source_dir }}/etc/cvmfs/domain.d/{{ item.domain }}.conf"
62-
mode: 0644
62+
mode: "0644"
6363
with_items: "{{ eessi_cvmfs_server_urls }}"

requirements.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
---
2-
32
# ansible-galaxy role install -r requirements.yml
43
roles:
5-
64
- name: eessi.cvmfs
75
src: https://github.com/EESSI/ansible-cvmfs
86
version: 34b6e07
9-
107
- name: geerlingguy.repo-epel
11-
version: 3.0.0
8+
version: 3.1.1
9+
10+
collections:
11+
- name: community.general
12+
version: '>=8.6.1'
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
cvmfs_start_transaction: true
2-
cvmfs_publish_transaction: true
3-
cvmfs_abort_transaction_on_failures: true
1+
create_cvmfs_content_structure_start_transaction: true
2+
create_cvmfs_content_structure_publish_transaction: true
3+
create_cvmfs_content_structure_abort_transaction_on_failures: true

roles/create_cvmfs_content_structure/tasks/do_repo.yml

Lines changed: 52 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -5,52 +5,64 @@
55
ansible.builtin.include_vars: "{{ cvmfs_repo }}.yml"
66

77
- name: Start transaction
8-
ansible.builtin.command: "cvmfs_server transaction {{ cvmfs_repo }}"
9-
when: cvmfs_start_transaction
8+
ansible.builtin.command:
9+
cmd: "cvmfs_server transaction {{ cvmfs_repo }}"
10+
creates: "/var/spool/cvmfs/{{ cvmfs_repo }}/in_transaction.lock"
11+
when: create_cvmfs_content_structure_start_transaction
1012

1113
- name: Apply changes to CVMFS repository, if there are any
1214
block:
13-
- name: "Create directories"
14-
ansible.builtin.file:
15-
path: "/cvmfs/{{ cvmfs_repo }}/{{ item.name }}"
16-
state: directory
17-
mode: "{{ item.mode }}"
18-
with_items: "{{ directories }}"
19-
register: create_directories
20-
21-
- name: "Create symlinks"
22-
ansible.builtin.file:
23-
path: "/cvmfs/{{ cvmfs_repo }}/{{ item }}"
24-
src: "{{ symlinks[item] }}"
25-
state: link
26-
force: true
27-
with_items: "{{ symlinks }}"
28-
register: create_symlinks
29-
30-
- name: "Copy files"
31-
ansible.builtin.copy:
32-
src: "{{ item.name }}"
33-
dest: "/cvmfs/{{ cvmfs_repo }}/{{ item.dest }}"
34-
mode: "{{ item.mode }}"
35-
with_items: "{{ files }}"
36-
register: create_files
37-
38-
- name: Publish transaction
39-
ansible.builtin.command: "cvmfs_server publish {{ cvmfs_repo }}"
40-
when:
41-
- cvmfs_start_transaction
42-
- cvmfs_publish_transaction
43-
- create_symlinks.changed or create_files.changed
44-
register: publish
45-
46-
- name: Abort transaction
47-
ansible.builtin.command: "cvmfs_server abort {{ cvmfs_repo }}"
48-
when: publish is skipped
15+
- name: "Create directories"
16+
ansible.builtin.file:
17+
path: "/cvmfs/{{ cvmfs_repo }}/{{ item.name }}"
18+
state: directory
19+
mode: "{{ item.mode }}"
20+
with_items: "{{ directories }}"
21+
register: create_cvmfs_content_structure_create_directories
22+
23+
- name: "Create symlinks"
24+
ansible.builtin.file:
25+
path: "/cvmfs/{{ cvmfs_repo }}/{{ item }}"
26+
src: "{{ symlinks[item] }}"
27+
state: link
28+
force: true
29+
with_items: "{{ symlinks }}"
30+
register: create_cvmfs_content_structure_create_symlinks
31+
32+
- name: "Copy files"
33+
ansible.builtin.copy:
34+
src: "{{ item.name }}"
35+
dest: "/cvmfs/{{ cvmfs_repo }}/{{ item.dest }}"
36+
mode: "{{ item.mode }}"
37+
with_items: "{{ files }}"
38+
register: create_cvmfs_content_structure_create_files
39+
40+
- name: Publish transaction
41+
ansible.builtin.command:
42+
cmd: "cvmfs_server publish {{ cvmfs_repo }}"
43+
removes: "/var/spool/cvmfs/{{ cvmfs_repo }}/in_transaction.lock"
44+
when:
45+
- create_cvmfs_content_structure_start_transaction
46+
- create_cvmfs_content_structure_publish_transaction
47+
- create_cvmfs_content_structure_create_symlinks.changed or
48+
create_cvmfs_content_structure_create_files.changed or
49+
create_cvmfs_content_structure_create_directories.changed
50+
register: create_cvmfs_content_structure_publish
51+
52+
- name: Abort transaction
53+
ansible.builtin.command:
54+
cmd: "cvmfs_server abort {{ cvmfs_repo }}"
55+
removes: "/var/spool/cvmfs/{{ cvmfs_repo }}/in_transaction.lock"
56+
when: create_cvmfs_content_structure_publish is skipped
4957

5058
rescue:
5159
- name: Abort transaction
52-
ansible.builtin.command: "cvmfs_server abort -f {{ cvmfs_repo }}"
53-
when: cvmfs_start_transaction and cvmfs_abort_transaction_on_failures
60+
ansible.builtin.command:
61+
cmd: "cvmfs_server abort {{ cvmfs_repo }}"
62+
removes: "/var/spool/cvmfs/{{ cvmfs_repo }}/in_transaction.lock"
63+
when:
64+
- create_cvmfs_content_structure_start_transaction
65+
- create_cvmfs_content_structure_abort_transaction_on_failures
5466

5567
- name: Exit because of failure
5668
ansible.builtin.fail:

0 commit comments

Comments
 (0)