| --- |
| # tasks file for apigee-opdk-setup-edge-sso |
| - name: Install openssh |
| tags: ['yum'] |
| become: yes |
| yum: |
| name: openssh |
| state: present |
| |
| - name: Update cache with key and value |
| cache: |
| key: "{{ item.key }}" |
| value: "{{ item.value }}" |
| with_items: |
| - { key: 'sso_jwt_signinig_key_filepath', value: '{{ sso_jwt_signinig_key_filepath }}' } |
| - { key: 'sso_saml_service_provider_key', value: '{{ sso_saml_service_provider_key }}' } |
| - { key: 'sso_saml_service_provider_certificate', value: '{{ sso_saml_service_provider_certificate }}' } |
| |
| - name: Create Private key and Self Signed Certificate Request |
| tags: ['private'] |
| include_tasks: create-saml-keys-cert.yml |
| |
| - name: Create Verification and Signing Key |
| tags: ['verify'] |
| include_tasks: create-jwt-keys.yml |
| |
| - name: Update cache with key and value |
| cache: |
| key: "{{ item.key }}" |
| value: "{{ item.value }}" |
| with_items: |
| - { key: 'edge_sso_installation_config_filename' , value: '{{ edge_sso_installation_config_filename }}' } |
| - { key: 'edge_sso_installation_config_file', value: "{{ edge_sso_installation_config_file }}" } |
| |
| - name: Touch file |
| become: yes |
| file: |
| state: touch |
| path: "{{ edge_sso_installation_config_file }}" |
| |
| - name: Assert that availability of SAML IDP metadata file |
| assert: |
| that: |
| - "sso_saml_idp_metadata_url is defined" |
| |
| - name: Construct the Edge SSO Installation config file file |
| become: yes |
| template: |
| src: '{{ edge_sso_installation_config_filename }}.j2' |
| dest: "{{ edge_sso_installation_config_file }}" |
| force: yes |
| owner: '{{ opdk_user_name }}' |
| group: '{{ opdk_group_name }}' |
| mode: 0655 |
| when: manual_edge_sso_installation_config_file is not defined or not manual_edge_sso_installation_config_file |
| |
| - name: Copy the provided Edge SSO Installation config file |
| become: yes |
| copy: |
| src: "{{ manual_edge_sso_installation_config_file }}" |
| dest: "{{ edge_sso_installation_config_file }}" |
| owner: '{{ opdk_user_name }}' |
| group: '{{ opdk_group_name }}' |
| mode: 0655 |
| when: manual_edge_sso_installation_config_file is defined and manual_edge_sso_installation_config_file |
| |