controller_credential_input_sources.yml

In these files we configure the input sources of credentials for automation controller.
we will probably do this on the global configuration (ALL).

variables

The api gives us the following structure to fill in our configuration:

{
    "description": "",
    "input_field_name": "",
    "metadata": {},
    "target_credential": null,
    "source_credential": null
}

group_vars/all/controller_credential_input_sources.yml

Here we see an example of the configuration for a credential mapping to the cyberark credential vault.

---
controller_credential_input_sources_all: []
  - source_credential: cyberark
    target_credential: gitlab
    input_field_name: password
    metadata:
      object_query: "Safe=MY_SAFE;Object=AWX-user"
      object_query_format: "Exact"
    description: Fill the gitlab credential from CyberArk
...

But you can already see that the variable name used here has the "_all" extension, so the variable will not be overridden as this is not quite a inventory.
Why we do this, will become clear in a moment.

group_vars/dev/controller_credential_input_sources.yml

As we do not configure extra credential_input_sources in development, this file is an empty set.

---
controller_credential_input_sources_dev: []
  # No extra config exists
...

Here the variable has the "_dev" extension, so the variable will not be overridden.

group_vars/prod/controller_credential_input_sources.yml

As we do not configure extra credential_input_sources in prod, this file is an empty set.

---
controller_credential_input_sources_prod: []
  # No extra config exists
...

Here the variable has the "_prod" extension, so the variable will not be overridden.

When we run a pipeline for a certain environment, the inventory structure will provide us with 2 variables: - controller_credential_input_sources_all
- controller_credential_input_sources_

We will merge these 2 variables into 1: controller_credential_input_sources and feed this to the infra.aap_configuration.controller_credential_input_sources role.

Back