Skip to content

Commit

Permalink
YDA-5140: install rulesets on consumers by default
Browse files Browse the repository at this point in the history
  • Loading branch information
lwesterhof committed Nov 28, 2023
1 parent 2ef4672 commit 6482046
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 25 deletions.
1 change: 0 additions & 1 deletion docs/administration/configuring-yoda.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ default_yoda_schema | Default Yoda metadata scheme: default-3
yoda_random_id_length | Length of random ID to add to persistent identifier
yoda_prefix | Prefix for internal portion of persistent identifier
update_rulesets | Update already installed rulesets with git
override_resc_install_rulesets | Install rulesets on server even if it is a resource server (default: false). This override parameter can be used on resource servers that have an additional role, e.g. DavRODS server
update_schemas | Update already installed schemas, formelements and stylesheets: yes (1) or no (0)
credential_files | Location of Yoda credentials files
temporary_files | List of temporary files for cleanup functionality
Expand Down
2 changes: 0 additions & 2 deletions environments/development/surf/group_vars/surf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,6 @@ irods_resources:
resource_research: irodsResc
resource_vault: irodsRescS3

override_resc_install_rulesets: true

# Replication configuration
enable_async_replication: 0 # Enable asynchronous replication: yes (1) or no (0)

Expand Down
2 changes: 0 additions & 2 deletions playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@
become: true
roles:
- role: yoda_rulesets
install_rulesets: true
tags:
- icat

Expand All @@ -191,7 +190,6 @@
become: true
roles:
- role: yoda_rulesets
install_rulesets: '{{ override_resc_install_rulesets | default(False) }}'
tags:
- resource

Expand Down
24 changes: 23 additions & 1 deletion roles/yoda_rulesets/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,28 @@
extra_args: --user


- name: Link ruleset directory
ansible.builtin.file:
src: "{{ ruleset.name }}"
dest: "/etc/irods/{{ ruleset.ruleset_name | replace('-', '_') }}"
state: link
with_items: "{{ extra_rulesets + core_rulesets }}"
loop_control:
loop_var: ruleset
when: ruleset.install_scripts


- name: Create local Yoda ruleset configuration
ansible.builtin.template:
src: rules_uu.cfg.j2
dest: "/etc/irods/yoda-ruleset/rules_uu.cfg"
owner: '{{ irods_service_account }}'
group: '{{ irods_service_account }}'
mode: '0600'
no_log: true
when: not ansible_check_mode


- name: Ensure all rulesets are in server config
become_user: "{{ irods_service_account }}"
become: true
Expand All @@ -164,4 +186,4 @@
with_items: "{{ extra_rulesets + core_rulesets }}"
loop_control:
loop_var: ruleset
when: ruleset.install_scripts and install_rulesets
when: ruleset.install_scripts and 'icats' in group_names
19 changes: 0 additions & 19 deletions roles/yoda_rulesets/tasks/yoda-ruleset.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
# Copyright Utrecht University

- name: Link ruleset directory
ansible.builtin.file:
src: yoda-ruleset
dest: /etc/irods/rules_uu
state: link
when: not ansible_check_mode


- name: Get iRODS home directory
become_user: '{{ irods_service_account }}'
become: true
Expand Down Expand Up @@ -89,17 +81,6 @@
when: storage_statistics.stat.exists


- name: Create local Yoda ruleset configuration
ansible.builtin.template:
src: rules_uu.cfg.j2
dest: "/etc/irods/yoda-ruleset/rules_uu.cfg"
owner: '{{ irods_service_account }}'
group: '{{ irods_service_account }}'
mode: '0600'
no_log: true
when: not ansible_check_mode


- name: Ensure that ExecCmd dir exists
ansible.builtin.file:
path: /var/lib/irods/msiExecCmd_bin
Expand Down

0 comments on commit 6482046

Please sign in to comment.