Skip to content

Commit

Permalink
Add a few bad VOs and configure all the rest
Browse files Browse the repository at this point in the history
  • Loading branch information
brucellino committed Jun 27, 2018
1 parent ce7ccff commit 36388af
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 8 deletions.
3 changes: 3 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,7 @@ lavoisier:
voms_dn_query: json.voVoms[*].Vo[0].VoVomsServer[0].VoVomsServer[2].X509Cert[0].DN[0]
voms_ca_dn_query: json.voVoms[*].Vo[0].VoVomsServer[0].VoVomsServer[2].X509Cert[1].CA_DN[0]
bad_vos:
- 42
- 70
- 184
- 185
41 changes: 33 additions & 8 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
"{{ item.Vo[0].VoVomsServer[0].VoVomsServer[2].X509Cert[0].DN[0] }}"
"{{ item.Vo[0].VoVomsServer[0].VoVomsServer[2].X509Cert[1].CA_DN[0] }}"
loop: "{{ vo_voms | json_query('json.voVoms[0:42]') }}"
ignore_errors: true

- name: Ensure LSC files present (43-69)
copy:
Expand All @@ -47,23 +46,49 @@
"{{ item.Vo[0].VoVomsServer[0].VoVomsServer[2].X509Cert[0].DN[0] }}"
"{{ item.Vo[0].VoVomsServer[0].VoVomsServer[2].X509Cert[1].CA_DN[0] }}"
loop: "{{ vo_voms | json_query('json.voVoms[43:69]') }}"
ignore_errors: true

- name: Ensure LSC files present (71-192)
- name: Ensure LSC files present (71-183)
copy:
dest: "{{ voms_dir }}/{{item.name}}/{{ item.Vo[0].VoVomsServer[0].VoVomsServer[1].hostname[0] }}.lsc"
content: |
"{{ item.Vo[0].VoVomsServer[0].VoVomsServer[2].X509Cert[0].DN[0] }}"
"{{ item.Vo[0].VoVomsServer[0].VoVomsServer[2].X509Cert[1].CA_DN[0] }}"
loop: "{{ vo_voms | json_query('json.voVoms[70:100]') }}"
ignore_errors: true
loop: "{{ vo_voms | json_query('json.voVoms[71:183]') }}"

- name: Ensure LSC files present (186-)
copy:
dest: "{{ voms_dir }}/{{item.name}}/{{ item.Vo[0].VoVomsServer[0].VoVomsServer[1].hostname[0] }}.lsc"
content: |
"{{ item.Vo[0].VoVomsServer[0].VoVomsServer[2].X509Cert[0].DN[0] }}"
"{{ item.Vo[0].VoVomsServer[0].VoVomsServer[2].X509Cert[1].CA_DN[0] }}"
loop: "{{ vo_voms | json_query('json.voVoms[186:]') }}"
# See http://italiangrid.github.io/voms/documentation/voms-clients-guide/3.0.3/#vomses
# Format is "vo_name" "hostname" "port" "dn" "alias"
# path is vomses_dir/vo_name-voms-server
- name: Ensure vomses are present
- name: Ensure vomses are present (0-41)
copy:
dest: "{{ vomses_dir }}/{{ item.name }}-{{ item.Vo[0].VoVomsServer[0].VoVomsServer[1].hostname[0] }}"
content: "'{{ item.name }}' '{{ item.Vo[0].VoVomsServer[0].VoVomsServer[1].hostname[0]}}' '{{ item.Vo[0].VoVomsServer[0].vomses_port }}' '{{ item.Vo[0].VoVomsServer[0].VoVomsServer[2].X509Cert[0].DN[0] }}' '{{ item.name }}'"
# content: "vo_name hostname port dn alias"
loop: "{{ vo_voms | json_query('json.voVoms[0:41]')}}"

- name: Ensure vomses are present (43-69)
copy:
dest: "{{ vomses_dir }}/{{ item.name }}-{{ item.Vo[0].VoVomsServer[0].VoVomsServer[1].hostname[0] }}"
content: "'{{ item.name }}' '{{ item.Vo[0].VoVomsServer[0].VoVomsServer[1].hostname[0]}}' '{{ item.Vo[0].VoVomsServer[0].vomses_port }}' '{{ item.Vo[0].VoVomsServer[0].VoVomsServer[2].X509Cert[0].DN[0] }}' '{{ item.name }}'"
# content: "vo_name hostname port dn alias"
loop: "{{ vo_voms | json_query('json.voVoms[43:69]')}}"

- name: Ensure vomses are present (71-183)
copy:
dest: "{{ vomses_dir }}/{{ item.name }}-{{ item.Vo[0].VoVomsServer[0].VoVomsServer[1].hostname[0] }}"
content: "'{{ item.name }}' '{{ item.Vo[0].VoVomsServer[0].VoVomsServer[1].hostname[0]}}' '{{ item.Vo[0].VoVomsServer[0].vomses_port }}' '{{ item.Vo[0].VoVomsServer[0].VoVomsServer[2].X509Cert[0].DN[0] }}' '{{ item.name }}'"
# content: "vo_name hostname port dn alias"
loop: "{{ vo_voms | json_query('json.voVoms[71:183]')}}"

- name: Ensure vomses are present (186-)
copy:
dest: "{{ vomses_dir }}/{{ item.name }}-{{ item.Vo[0].VoVomsServer[0].VoVomsServer[1].hostname[0] }}"
content: "'{{ item.name }}' '{{ item.Vo[0].VoVomsServer[0].VoVomsServer[1].hostname[0]}}' '{{ item.Vo[0].VoVomsServer[0].vomses_port }}' '{{ item.Vo[0].VoVomsServer[0].VoVomsServer[2].X509Cert[0].DN[0] }}' '{{ item.name }}'"
# content: "vo_name hostname port dn alias"
loop: "{{ vo_voms | json_query('json.voVoms[*]')}}"
ignore_errors: true
loop: "{{ vo_voms | json_query('json.voVoms[186:]')}}"

0 comments on commit 36388af

Please sign in to comment.