Skip to content
Snippets Groups Projects
Forked from hpc-team / HPCasCode
1925 commits behind the upstream repository.
shibbolethConfig.yml 3.81 KiB
---
#-
# name: "Copying the shibboleth files"
# template: src=files/{{ item.src }} dest="{{ item.dest }}" mode=0644
# with_items: shibboleth_file
# sudo: true

- 
  name: "Setting shibboleth2.xml sp.example.org"
  sudo: true
  replace: 
  args:
   dest: /etc/shibboleth/shibboleth2.xml 
   regexp: sp.example.org 
   replace: "{{ ansible_hostname }}.{{ domain }}"
   backup: yes
   
-
 name: "Remove SSO entityID"
 lineinfile: 
 args:
   dest: /etc/shibboleth/shibboleth2.xml
   regexp: '^(\s*)<SSO entityID="https://idp.example.org/idp/shibboleth"'
   line: '\1<SSO'
   backrefs: true
 sudo: true

- 
  name: "Setting shibboleth2.xml handlerSSL"
  sudo: true
  replace: 
  args:
   dest: /etc/shibboleth/shibboleth2.xml 
   regexp: 'handlerSSL="false"' 
   replace: 'handlerSSL="true"   handlerURL="https://{{ ansible_hostname }}.{{ domain }}/Shibboleth.sso"' 
   

- 
  name: "Setting shibboleth2.xml supportContact"
  sudo: true
  replace: 
  args:
   dest: /etc/shibboleth/shibboleth2.xml 
   regexp: 'supportContact="root@localhost"' 
   replace: 'supportContact="{{ admin_email }}"'
   

- 
  name: "Enabling MetadataProvider"
  sudo: true
  replace: 
  args:
   dest: /etc/shibboleth/shibboleth2.xml 
   regexp: '<!-- Example of remotely supplied batch of signed metadata. -->\s+<!--\s+<MetadataProvider' 
   replace: '<!-- Example of remotely supplied batch of signed metadata. -->\n\t<MetadataProvider'
   
- 
  name: "Enabling MetadataProvider"
  sudo: true
  replace: 
  args:
   dest: /etc/shibboleth/shibboleth2.xml 
   regexp: '</MetadataProvider>\s+-->' 
   replace: '</MetadataProvider>'
- 
  name: "Setting shibboleth2.xml Federation URI"
  sudo: true
  replace: 
  args:
   dest: /etc/shibboleth/shibboleth2.xml