@@ -156,7 +156,7 @@ Deployment jobs also support _optional_ **hook scripts** from your project, loca
### Manage remote repositories authentication
Specifying an [Ansible requirements file](https://docs.ansible.com/ansible/latest/galaxy/user_guide.html#install-multiple-collections-with-a-requirements-file)(with`$ANSIBLE_REQUIREMENTS_FILE`), you may use Ansible roles from remote places (Ansible repository, Git repository, ...).
Specifying an [Ansible requirements file](https://docs.ansible.com/ansible/latest/galaxy/user_guide.html#install-multiple-collections-with-a-requirements-file)(with`$ANSIBLE_REQUIREMENTS_FILE`), you may use Ansible roles and collections from remote places (Ansible repository, Git repository, ...).
Accessing those repositories may require an authentication.
In such a case, you may configure the remote authentication(s) by providing a _variabilized_ `.netrc` file at the root of your Ansible project.
@@ -272,13 +272,18 @@ This template can be configured with the following **environment variables**:
| `default-inventory` / `ANSIBLE_DEFAULT_INVENTORY` | The default inventory, if used | **has to be defined if used** |
| `default-tags` / `ANSIBLE_DEFAULT_TAGS` | The default tags, if used | **has to be defined if used** |
| `default-extra-args` / `ANSIBLE_DEFAULT_EXTRA_ARGS` | Optional default args to add to the ansible-playbook command line | **has to be defined if used** |
| `default-roles-path` / `ANSIBLE_DEFAULT_ROLES_PATH` | The default path where the roles should be installed | `$CI_PROJECT_DIR/roles` |
| `force-color` / `ANSIBLE_FORCE_COLOR` | Forces color on Ansible output | `true` |
| `requirements-file` / `ANSIBLE_REQUIREMENTS_FILE` | The file used to install roles with `ansible-galaxy role install` | `requirements.yml` |
| `requirements-file` / `ANSIBLE_REQUIREMENTS_FILE` | The file used to install roles and collections with `ansible-galaxy install` | `requirements.yml` |
| `scripts-dir` / `ANSIBLE_SCRIPTS_DIR` | The Ansible scripts base directory (relative to `$ANSIBLE_PROJECT_DIR`) | `.` |
| `host-key-checking` / `ANSIBLE_HOST_KEY_CHECKING` | Enable or disable the SSH host key checking | `false` (disabled) |
#### Use of `ANSIBLE_HOME`
Internally, the Ansible template sets [`ANSIBLE_HOME`](https://docs.ansible.com/ansible/latest/reference_appendices/config.html#ansible-home) to `$CI_PROJECT_DIR/$ANSIBLE_PROJECT_DIR/.ansible` and caches it (to optimize executions, more specifically when installing external collections and roles).
:warning: Don't use this directoy to store secrets in your playbook or they would be disclosed as public cache resources.
### Review environments configuration
Review environments are dynamic and ephemeral environments to deploy your _ongoing developments_ (a.k.a. _feature_ or _topic_ branches).