Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions roles/deploy/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
# Set php cli command based on whether the component requires php7
- set_fact:
php_cli: "{{ needphp7 | ternary('php72', 'php') }}"
symfony4: "{{ component_name in ['tiqr', 'webauthn', 'demo-gssp', 'demo-gssp-2'] }}"
symfony4: "{{ component_name in ['tiqr', 'webauthn', 'demo-gssp', 'demo-gssp-2', 'middleware', 'ra'] }}"

# If composer install fails:
# - Remove the non .dist versions of the configuration in /app/config
Expand Down Expand Up @@ -165,10 +165,6 @@

- name: DEVELOP - put app_dev.php
copy: remote_src=true src={{ component_dir_name }}/app_dev.php.dist dest={{ component_dir_name }}/web/app_dev.php
when: component_name not in ["tiqr", "keyserver", "demo-gssp", "demo-gssp-2"]

- name: DEVELOP - put app_test.php
copy: remote_src=true src={{ component_dir_name }}/app_test.php.dist dest={{ component_dir_name }}/web/app_test.php
when: component_name not in ["tiqr", "keyserver", "demo-gssp", "demo-gssp-2"]
when: component_name not in ["tiqr", "keyserver", "demo-gssp", "demo-gssp-2", "middleware", "ra"]

when: develop | default(false)
2 changes: 1 addition & 1 deletion roles/stepup-gssp-example/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# nodejs 12 and yarn were installed by the dev role using nvm
- name: Run yarn encore dev using nodejs 12
shell:
cmd: source /root/.bashrc && nvm use 12 && yarn encore dev
cmd: source /root/.bashrc && nvm use 12 && yarn && yarn encore dev
chdir: "{{ component_dir_name }}"

- name: Copy .env file
Expand Down
10 changes: 5 additions & 5 deletions roles/stepup-middleware/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Infra stuff for middleware

- name: Put parameters.yml
template: src=parameters.yml.j2 dest={{ component_dir_name }}/app/config/parameters.yml mode={{ component_mode_640 }} group={{ component_group }}
template: src=parameters.yml.j2 dest={{ component_dir_name }}/config/legacy/parameters.yml mode={{ component_mode_640 }} group={{ component_group }}

- name: assets:install
command: php app/console assets:install --symlink --env=prod {{ debug_flag }}
command: php72 bin/console assets:install --symlink --env=prod {{ debug_flag }}
args:
chdir: "{{ component_dir_name }}"

- name: Clear and warmup cache
command: php app/console cache:clear --env=prod {{ debug_flag }}
command: php72 bin/console cache:clear --env=prod {{ debug_flag }}
args:
chdir: "{{ component_dir_name }}"
when: not (develop | default(false))
Expand All @@ -23,8 +23,8 @@
- name: Grant app write access to cache and log dirs
file: path={{item}} group={{ component_group }} mode={{ component_mode_770 }} recurse=yes
with_items:
- "{{ component_dir_name }}/app/cache"
- "{{ component_dir_name }}/app/logs"
- "{{ component_dir_name }}/var/cache"
- "{{ component_dir_name }}/var/logs"
when: not (develop | default(false))

- name: Put middleware configuration scripts in /root/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

pushd /opt/www/{{ middleware_vhost_name }}
php app/console middleware:migrations:migrate --env=prod
php bin/console middleware:migrations:migrate --env=prod
popd
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ else
fi
if [[ ${REPLY} =~ ^[Yy]$ ]]
then
php app/console middleware:bootstrap:identity-with-yubikey --env=prod {{ sraa.nameid }} {{ sraa.institution }} "{{ sraa.cn }}" {{ sraa.email }} {{ sraa.lang }} {{ sraa['yubikey_id'] }}
php bin/console middleware:bootstrap:identity-with-yubikey --env=prod {{ sraa.nameid }} {{ sraa.institution }} "{{ sraa.cn }}" {{ sraa.email }} {{ sraa.lang }} {{ sraa['yubikey_id'] }}
fi
{% endfor %}
popd
28 changes: 9 additions & 19 deletions roles/stepup-ra/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Infra suff for RA

- name: Put parameters.yml, samlstepupproviders(_parameters).yml and global_view_parameters.yml
template: src={{ item }}.j2 dest={{ component_dir_name }}/app/config/{{ item }} mode={{ component_mode_640 }} group={{ component_group }}
template: src={{ item }}.j2 dest={{ component_dir_name }}/config/legacy/{{ item }} mode={{ component_mode_640 }} group={{ component_group }}
with_items:
- parameters.yml
- samlstepupproviders.yml
- samlstepupproviders_parameters.yml
- global_view_parameters.yml

- name: Put images from <env>/files/stepup-app into web/images
copy: src={{ item }} dest={{ component_dir_name }}/web/images mode=444 group={{ component_group }}
- name: Put images from <env>/files/stepup-app into public/images
copy: src={{ item }} dest={{ component_dir_name }}/public/images mode=444 group={{ component_group }}
with_fileglob:
- "{{inventory_dir }}/files/stepup-app/images/*"

Expand All @@ -19,22 +19,12 @@
- "{{inventory_dir }}/files/stepup-app/images/second-factor/*"

- name: assets:install
command: php app/console assets:install --symlink --env=prod {{ debug_flag }}
args:
chdir: "{{ component_dir_name }}"

- name: mopa:bootstrap:symlink:less
command: php app/console mopa:bootstrap:symlink:less --env=prod {{ debug_flag }}
args:
chdir: "{{ component_dir_name }}"

- name: Dump Assetic Assets
command: php app/console assetic:dump --env=prod {{ debug_flag }}
command: php72 bin/console assets:install --symlink --env=prod {{ debug_flag }}
args:
chdir: "{{ component_dir_name }}"

- name: Clear and warmup cache
command: php app/console cache:clear --env=prod {{ debug_flag }}
command: php bin/console cache:clear --env=prod {{ debug_flag }}
args:
chdir: "{{ component_dir_name }}"
when: not (develop | default(false))
Expand All @@ -55,18 +45,18 @@
# SAML SP signing certificate for authentication to the normal authentication (i.e. /authentication/metadata) IdP enspoint
# on the Stepup-Gateway
- name: Write SAML SP private key
copy: content="{{ ra_saml_sp_privatekey | vault(vault_keydir) }}" dest={{ component_dir_name }}/app/config/sp.key owner={{ component_owner }} mode={{ component_mode_400 }}
copy: content="{{ ra_saml_sp_privatekey | vault(vault_keydir) }}" dest={{ component_dir_name }}/config/sp.key owner={{ component_owner }} mode={{ component_mode_400 }}

- name: Write SAML SP certificate
copy: content="{{ ra_saml_sp_publickey }}" dest={{ component_dir_name }}/app/config/sp.crt group={{ component_group }} mode={{ component_mode_640 }}
copy: content="{{ ra_saml_sp_publickey }}" dest={{ component_dir_name }}/config/sp.crt group={{ component_group }} mode={{ component_mode_640 }}

# SAML SP signing certificate for authentication to the GSSP IdP proxy enspoint(s)
# on the Stepup-Gateway
- name: Write GSSP SP private key
copy: content="{{ ra_gssp_sp_privatekey | vault(vault_keydir) }}" dest={{ component_dir_name }}/app/config/sp_gssp.key owner={{ component_owner }} mode={{ component_mode_400 }}
copy: content="{{ ra_gssp_sp_privatekey | vault(vault_keydir) }}" dest={{ component_dir_name }}/config/sp_gssp.key owner={{ component_owner }} mode={{ component_mode_400 }}

- name: Write GSSP SP certificate
copy: content="{{ ra_gssp_sp_publickey }}" dest={{ component_dir_name }}/app/config/sp_gssp.crt group={{ component_group }} mode={{ component_mode_640 }}
copy: content="{{ ra_gssp_sp_publickey }}" dest={{ component_dir_name }}/config/sp_gssp.crt group={{ component_group }} mode={{ component_mode_640 }}


- name: Set stepup directory rights
Expand Down
5 changes: 0 additions & 5 deletions roles/stepup-selfservice/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@
args:
chdir: "{{ component_dir_name }}"

- name: Dump Assetic Assets
command: php app/console assetic:dump --env=prod {{ debug_flag }}
args:
chdir: "{{ component_dir_name }}"

- name: Clear and warmup cache
command: php app/console cache:clear --env=prod {{ debug_flag }}
args:
Expand Down