Alfresco/alfresco-ansible-deployment

free the `trouter` role from using the `setenv.sh` file

alxgomz opened this issue · 0 comments

Bug description

The file setenv.sh is deployed by the java role using template and amended using its dependent roles. such as tomcat, search, sync, etc…

This is problematic generally speaking (in particular for idempotence) as we want to avoid cases where one part of the playbook may interfere with what another part needs to do.

Target OS

all

Ansible error

molecule idempotence test failures (currently skipped using molecule-idempotence-notest)

Acceptance criteria

A possible way around that would be to take common env variable population out of the java role and let each role do it by directly using the systemd unit file Environment= or EnvironmentFile=. As a result:

  • trouter role provides its own set of vars in a systemd unit environment file
  • no more lineinfile or blockinfile task is used to amend the setenv.sh file
  • script template is no more sources the setenv.sh file
  • clear the molecule-idempotence-notest tag from all possible tasks in the trouter role
  • tests are amended accordingly