ansible-devops icon indicating copy to clipboard operation
ansible-devops copied to clipboard

Manage environment variable lookup are set in the wrong place

Open durera opened this issue 3 years ago • 1 comments

https://github.com/ibm-mas/ansible-devops/blob/master/ibm/mas_devops/roles/suite_app_config/vars/manage.yml

Environment variable lookups should not be performed in vars files, it prevents vars being passed in "normally", all env var lookups should be in defaults/.

For example, if user sets:

vars:
  mas_app_settings_aio_flag: True

This won't work, because here we override it: https://github.com/ibm-mas/ansible-devops/blob/master/ibm/mas_devops/roles/suite_app_config/vars/manage.yml#L9

This env var lookup should be in in defaults, so that setting the var takes precedence.

https://github.com/ibm-mas/ansible-devops/blob/master/ibm/mas_devops/roles/suite_app_config/defaults/main.yml

durera avatar Nov 16 '22 09:11 durera

@durera this seems like a good amount of work to re-design how this was created in first place, pretty much all apps have var files being used to feed its defaulted mas_appws_spec in here: https://github.com/ibm-mas/ansible-devops/tree/master/ibm/mas_devops/roles/suite_app_config/vars/defaultspecs

Do we need this for the next upcoming months or should this be considered lower priority? @alequint fyi

andrercm avatar Mar 22 '23 20:03 andrercm