sets and checks facts from environment variables or from terraform state on control host
The role depends on terraform and a backend configuration for terraform including the credentials (possibly set by environment variables) in the folder the playbook is executed (not the folder of the playbook).
The role uses community.general.json_query
.
group | variable | default | description |
---|---|---|---|
facts | set_and_check_ci_facts_required_vars | [] |
the list of variables to get from environment or terraform state The variables are looked up from
set_and_check_ci_facts_non_required_vars , ansible.builtin.failed is used to fail. |
facts | set_and_check_ci_facts_non_required_vars | [] |
the list of variables not to check if set or not |
facts | set_and_check_ci_facts_required_env_vars | [] |
the list of variables to get from environment The variables are looked up from the environment variables with the same name as in the list, but in upper cases. |
facts | set_and_check_ci_facts_non_required_env_vars | [] |
the list of variables not to check if set or not (subset of set_and_check_ci_facts_required_env_vars ) |
facts | set_and_check_ci_facts_required_tf_vars | [] |
the list of environment variables TF_VAR_ and assumed to be named with exact case. |
facts | set_and_check_ci_facts_non_required_tf_vars | [] |
the list of variables TF_VAR_* not to check if set or not (subset of set_and_check_ci_facts_required_tf_vars ) |
control | set_and_check_ci_facts_from_terraform_state | false |
if the facts in set_and_check_ci_facts_required_vars should be read from terraform state instead from environment |
control | set_and_check_ci_facts_terraform_command | 'terraform' |
the terraform cmd This can be used for GitLab ci to set togitlab-terraform or for specifying a terraform command by full path. |
control | set_and_check_ci_facts_terraform_dir |
'.' |
the director to chdir before executing set_and_check_ci_facts_terraform_command |
debug | set_and_check_ci_facts_print_terraform_state |
false |
if the terraform state should be printed (only output values) |