forked from ISTI-ansible-roles/ansible-roles
simplesaml: do not create and install the certificates when they are externally provided.
This commit is contained in:
parent
02c75a7bde
commit
dc0cb3b15e
|
@ -27,6 +27,7 @@ simplesaml_loglevel: NOTICE
|
||||||
|
|
||||||
# Change this one when we are setting up a cluster of simplesaml servers
|
# Change this one when we are setting up a cluster of simplesaml servers
|
||||||
simplesaml_create_self_signed_cert_host: '{{ ansible_fqdn }}'
|
simplesaml_create_self_signed_cert_host: '{{ ansible_fqdn }}'
|
||||||
|
simplesaml_provide_an_external_cert: False
|
||||||
simplesaml_servername: '{{ ansible_fqdn }}'
|
simplesaml_servername: '{{ ansible_fqdn }}'
|
||||||
|
|
||||||
simplesaml_enable_saml20_idp: 'true'
|
simplesaml_enable_saml20_idp: 'true'
|
||||||
|
|
|
@ -88,6 +88,7 @@
|
||||||
shell: openssl req -x509 -newkey rsa:2048 -keyout {{ simplesaml_cert_dir }}/key.pem -out {{ simplesaml_cert_dir }}/server.crt -days 3650 -nodes -subj '/CN={{ simplesaml_servername }}'
|
shell: openssl req -x509 -newkey rsa:2048 -keyout {{ simplesaml_cert_dir }}/key.pem -out {{ simplesaml_cert_dir }}/server.crt -days 3650 -nodes -subj '/CN={{ simplesaml_servername }}'
|
||||||
args:
|
args:
|
||||||
creates: '{{ simplesaml_cert_dir }}/server.crt'
|
creates: '{{ simplesaml_cert_dir }}/server.crt'
|
||||||
|
run_once: True
|
||||||
when: ansible_fqdn == simplesaml_create_self_signed_cert_host
|
when: ansible_fqdn == simplesaml_create_self_signed_cert_host
|
||||||
|
|
||||||
- name: Copy the self signed certificate from the first server to all the others
|
- name: Copy the self signed certificate from the first server to all the others
|
||||||
|
@ -103,6 +104,7 @@
|
||||||
- name: Fix the self certificate key permissions
|
- name: Fix the self certificate key permissions
|
||||||
file: dest={{ simplesaml_cert_dir }}/key.pem owner={{ simplesaml_user }} mode=0400
|
file: dest={{ simplesaml_cert_dir }}/key.pem owner={{ simplesaml_user }} mode=0400
|
||||||
|
|
||||||
|
when: not simplesaml_provide_an_external_cert | bool
|
||||||
tags: [ 'simplesaml', 'simplesaml_php', 'simplesaml_cert' ]
|
tags: [ 'simplesaml', 'simplesaml_php', 'simplesaml_cert' ]
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
|
|
Loading…
Reference in New Issue