From 36388afa8717d646d4e6a2d057ed44017efa5285 Mon Sep 17 00:00:00 2001 From: Bruce Becker Date: Wed, 27 Jun 2018 07:58:06 +0200 Subject: [PATCH] Add a few bad VOs and configure all the rest --- defaults/main.yml | 3 +++ tasks/main.yml | 41 +++++++++++++++++++++++++++++++++-------- 2 files changed, 36 insertions(+), 8 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 4804af9..cea506b 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -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 diff --git a/tasks/main.yml b/tasks/main.yml index 4a4b56e..1ce769e 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -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: @@ -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:]')}}"