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

free the tomcatrole from using the setenv.sh file #445

Open
alxgomz opened this issue Sep 24, 2022 · 0 comments
Open

free the tomcatrole from using the setenv.sh file #445

alxgomz opened this issue Sep 24, 2022 · 0 comments

Comments

@alxgomz
Copy link
Contributor

alxgomz commented Sep 24, 2022

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:

  • tomcat 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 tomcat role
  • tests are amended accordingly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants