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

Small fixes for cvmfs_server_meta_info role #164

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
10 changes: 10 additions & 0 deletions inventory/group_vars/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,16 @@ eessi_cvmfs_repositories:
client_options: []
use_for_ci: false
description: "Repository that contains the EESSI software stacks."
- repository: ci.software.eessi.io
stratum0: rug-nl.stratum0.cvmfs.eessi-infra.org
owner: "{{ cvmfs_repo_owner | default('root') }}"
key_dir: /etc/cvmfs/keys/eessi.io
server_options:
- CVMFS_AUTO_GC=false
- CVMFS_GARBAGE_COLLECTION=true
client_options: []
use_for_ci: true
description: "Small-sized epository used for CI purposes."

# Meta information for CVMFS Stratum servers
cvmfs_server_meta_administrator: "EESSI CVMFS Administrators"
Expand Down
6 changes: 3 additions & 3 deletions roles/cvmfs_server_meta_info/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
group: root
mode: 0644
become: true
when: (cvmfs_repositories | length) > 0
when: (cvmfs_repositories | default(eessi_cvmfs_repositories, true) | length) > 0

- name: Create meta information for each CVMFS repository
ansible.builtin.include_tasks: repo_meta_info.yml
Expand All @@ -18,6 +18,6 @@
recommended-stratum0: "http://{{ item.stratum0 }}/cvmfs/{{ item.repository }}"
recommended-stratum1s: "{{ eessi_cvmfs_server_urls | selectattr('domain', 'in', item.repository) |
map(attribute='urls') | map('regex_replace', '@fqrn@', item.repository) }}"
with_items: "{{ cvmfs_repositories | default(eessi_cvmfs_repositories) }}"
when: "'cvmfsstratum0servers' in group_names or cvmfs_role == 'stratum0'"
with_items: "{{ cvmfs_repositories | default(eessi_cvmfs_repositories, true) }}"
when: ('cvmfsstratum0servers' in group_names and inventory_hostname in groups['cvmfsstratum0servers']) or cvmfs_role == 'stratum0'
...
1 change: 1 addition & 0 deletions roles/cvmfs_server_meta_info/tasks/repo_meta_info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
ansible.builtin.command:
cmd: "cvmfs_server update-repoinfo -f {{ tmp_json_file.path }} {{ this_cvmfs_repo.repository }}"
when: (current_repo_meta.stdout | checksum) != json_file_stat.stat.checksum
become: true
become_user: "{{ cvmfs_repo_owner | default('root') }}"

- name: Remove temporary json file
Expand Down
Loading