Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEVOPS-420: Added a way to remove/delete a module/theme. #57

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from

Conversation

Tas-sos
Copy link
Contributor

@Tas-sos Tas-sos commented Jun 4, 2021

A way (first) delete the directory of an module/theme plus the configuration file of that module/theme.

  • ssp_mods_extra_disabled : The list of modules/themes to be removed.

Test example:

ansible-playbook -u debian -i rciam-deploy-inv/eosc-portal-demo/hosts.ini saml2samlservers.yml --tags="ssp-modules" --vault-password-file=/to/vault/file -vv

Use case 1: Just remove a module/theme in order to replace it with a new version

ls -lh /srv/simplesamlphp/proxy-rciam-1.18/modules/
themeeosc
ls -lh  /srv/simplesamlphp/proxy-rciam-1.18/config
authsources.php
config-metarefresh.php
config.php
module_cron.php
module_discopower.php
module_themeeosc.php
  • group_vars/saml2saml/ssp-modules.yml
ssp_mods_extra_disabled:                                                                                 
  - name: "themeeosc"
    module_path: "{{ ssp_path }}/modules/themeeosc"
    dest_config_path: "{{ ssp_path }}/config/module_themeeosc.php"


ssp_mods_extra_enabled:
  - name: "themeeosc"
    fullname: "simplesamlphp-module-themeeosc"
    path: "{{ ssp_path }}/modules/themeeosc"
    zip_url: "https://github.com/EGI-Foundation/simplesamlphp-module-themeeosc/releases/download/v-eosc-2.0.0/themeeosc.zip"
    version: "v-eosc-2.0.0"
    src_config_path: "{{ inventory_dir }}/files/templates/config/module_themeeosc-release-eosc-2.0.0.php.j2"
    dest_config_path: "{{ ssp_path }}/config/module_themeeosc.php"

Use case 2: Multiple versions of a module/theme

ls -lh /srv/simplesamlphp/proxy-rciam-1.18/modules/
themeeosc
themeeosc-v-eosc-2.1.1
ls -lh  /srv/simplesamlphp/proxy-rciam-1.18/config
authsources.php
config-metarefresh.php
config.php
module_cron.php
module_discopower.php
module_themeeosc.php
  • group_vars/saml2saml/ssp-modules.yml :
ssp_mods_extra_disabled:                                                                                 
  - name: "themeeosc"
    module_path: "{{ ssp_path }}/modules/themeeosc"
    dest_config_path: "{{ ssp_path }}/config/module_themeeosc.php"
  - name: "themeeosc"
    module_path: "{{ ssp_path }}/modules/themeeosc-v-eosc-2.1.1"
    dest_config_path: "{{ ssp_path }}/config/module_themeeosc.php"


ssp_mods_extra_enabled:
  #- name: "themeeosc"
  #  fullname: "simplesamlphp-module-themeeosc"
  #  path: "{{ ssp_path }}/modules/themeeosc"
  #  zip_url: "https://github.com/EGI-Foundation/simplesamlphp-module-themeeosc/releases/download/v-eosc-2.0.0/themeeosc.zip"
  #  version: "v-eosc-2.0.0"
  #  src_config_path: "{{ inventory_dir }}/files/templates/config/module_themeeosc-release-eosc-2.0.0.php.j2"
  #  dest_config_path: "{{ ssp_path }}/config/module_themeeosc.php"

  #- name: "themeeosc"
  #  fullname: "simplesamlphp-module-themeeosc"
  #  path: "{{ ssp_path }}/modules/themeeosc-v-eosc-2.1.1"
  #  zip_url: "https://github.com/EGI-Foundation/simplesamlphp-module-themeeosc/releases/download/v-eosc-2.1.1/themeeosc.zip"
  #  version: "v-eosc-2.1.1"
  #  src_config_path: "{{ inventory_dir }}/files/templates/config/module_themeeosc-release-eosc-2.0.0.php.j2"
  #  dest_config_path: "{{ ssp_path }}/config/module_themeeosc.php"

  - name: "themeeosc"
    fullname: "simplesamlphp-module-themeeosc"
    path: "{{ ssp_path }}/modules/themeeosc-v-eosc-2.1.2"
    zip_url: "https://github.com/EGI-Foundation/simplesamlphp-module-themeeosc/releases/download/v-eosc-2.1.2/themeeosc.zip"
    version: "v-eosc-2.1.1"
    src_config_path: "{{ inventory_dir }}/files/templates/config/module_themeeosc-release-eosc-2.0.0.php.j2"
    dest_config_path: "{{ ssp_path }}/config/module_themeeosc.php"

A way (first) delete the directory of an module/theme plus the configuration file of that module/theme.
* [X] `ssp_mods_extra_disabled` : The list of modules/themes to be removed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant