89luca89/terrible

Variables refactoring

Closed this issue · 1 comments

The purpose of this issue is to completely remove ansible internal variables from the project variables (API variables).
The variables in question are such: ansible_host, ansible_ssh_pass and so on.
These variables should be replaced with custom own variables, to avoid to create confusion.

According to this, we should also think of a better way to integrate the terraform jump host part with the ansible part, I can see right now is a little bit convoluted (have to enable them separately but being dependent in case of terraform bastion enabled for example)

Also we should explore generating variables in the playbook more if they are derivable

For the previous example:
if we have terraform_bastion_enabled: True we have to forcibly delcare all the variables related (user, pass, port etc)
from this we should think if we can derive the jumphosts for the ansible part?
Or we can do the reverse?

We should deduplicate as much as possible to mantain the inventory clean and single source of truth of the IaC