linux-system-roles / sap-preconfigure

preconfigure a server for any SAP software installations
Apache License 2.0
19 stars 27 forks source link

Overwriting of variables #29

Closed Klaas- closed 5 years ago

Klaas- commented 5 years ago

Hi, currently you suggest to overwrite certain variables through modifying vars/RedHat_7.yml and vars/RedHat_8.yml . This makes it impossible to modify those variables while using a mirrored version of this repository.

I would suggest to move some of the variables to defaults/main.yml (those that are same for rhel 7 and 8) and never use the vars/main.yml (or completely remove it)

Move to defaults/main.yml: sap_preconfigure_size_of_tmpfs_gb sap_preconfigure_locale sap_preconfigure_modify_etc_hosts sap_preconfigure_db_group_name Then they can easily be overwritten via playbook/cli/....

For the remaining ones I would suggest to move them to something like that: sap_preconfigure_sapnotes -> sap_preconfigure_sapnotes_default and then use something like this when using the variable: {{ sap_preconfigure_sapnotes | default(sap_preconfigure_sapnotes_default) }}

that way you should be able to overwrite the variables from cli in a nice manner aswell

For the first part I'll make a quick PR, the 2nd part is just a suggestion for now, If you think that this is a good idea I would implement it as soon as I get to it.

btw same problem is also in sap-hana-preconfigure

Greetings Klaas

berndfinger commented 5 years ago

Thanks for your efforts! Issue is fixed now, in both roles.