Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
micafer committed Sep 5, 2024
1 parent 684a05b commit c854f92
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 24 deletions.
2 changes: 2 additions & 0 deletions molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
- name: "Include grycap.motley-cue"
include_role:
name: "ansible-role-motley-cue"
vars:
ssh_oidc_other_vos_name: "vo.test.eu"


# - slurp: src=/etc/docker/daemon.json
Expand Down
51 changes: 27 additions & 24 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,30 +76,33 @@
command_env: "{{ command_env | combine ({ 'SSH_AUTHORISE_OTHERS_IN_MY_VO' : 1 }) }}"
when: ssh_oidc_my_vo

# Refernce:
# https://docs.egi.eu/users/aai/check-in/vos/expressing-vo-information/
- name: set eduPersonEntitlement
set_fact:
eduPersonEntitlement: >-
{{ssh_oidc_other_vos_namespace}}
:group
:{{ssh_oidc_other_vos_name}}
{%for group in ssh_oidc_other_vos_groups %}
:{{group}}
{% endfor %}
{% if ssh_oidc_other_vos_role != '' %}
:role={{ssh_oidc_other_vos_role}}
{% endif %}
#{{ssh_oidc_other_vos_authority}}
- name: Clean up and show eduPersonEntitlement that will be used
debug:
msg: "{{ eduPersonEntitlement | replace(' ','') }}"
register: eduPersonEntitlement_trimmed

- name: set SSH_AUTHORISE_VOS
set_fact:
command_env: "{{ command_env | combine ({ 'SSH_AUTHORISE_VOS' : ['{{ eduPersonEntitlement_trimmed.msg }}'] }) }}"
- block:

# Refernce:
# https://docs.egi.eu/users/aai/check-in/vos/expressing-vo-information/
- name: set eduPersonEntitlement
set_fact:
eduPersonEntitlement: >-
{{ssh_oidc_other_vos_namespace}}
:group
:{{ssh_oidc_other_vos_name}}
{%for group in ssh_oidc_other_vos_groups %}
:{{group}}
{% endfor %}
{% if ssh_oidc_other_vos_role != '' %}
:role={{ssh_oidc_other_vos_role}}
{% endif %}
#{{ssh_oidc_other_vos_authority}}
- name: Clean up and show eduPersonEntitlement that will be used
debug:
msg: "{{ eduPersonEntitlement | replace(' ','') }}"
register: eduPersonEntitlement_trimmed

- name: set SSH_AUTHORISE_VOS
set_fact:
command_env: "{{ command_env | combine ({ 'SSH_AUTHORISE_VOS' : ['{{ eduPersonEntitlement_trimmed.msg }}'] }) }}"

when: ssh_oidc_other_vos_name != ''

- name: Use python3.8 in Ubuntu 18.08
Expand Down

0 comments on commit c854f92

Please sign in to comment.