:sourcedir: ../../../../templates = Ansible Template A Template Collection to simplify the deployment automation with Ansible. All Templates need a $SSH_PRIVATE_KEY variable to be set in den Gitlab CI Variablen. .Provided Templates: |=== |Name |Description | .ansible_lint | Calls the Ansible Linter for static analysis. Output will be shown in CI output and can be used to optimize the Ansible manifests. |.ansible_playbook_validate | Executes the Ansible-check, provides inside if the execution of Ansible is possible and syntactically correct. |.ansible_playbook_run | Executes a defined Ansible playbooks. |=== .Variables |=== |Name |Description | Default Value |SSH_PRIVATE_KEY | The SSH key that will be used to access the remote maschine. !! DO NOT set this variable in your Repository. Use the Gitlab CI variables so not everyone has access to this Secret. Only Maintainer will have access to those Settings | NOT SET. Has to be set in the gitlab CI variables settings UI. |PLAYBOOK_PATH | Path to the playbook that should be executed | "playbook.yml" |INVENTORY_PATH | Path to the inventory that should be executed | "inventory.yml" |EXTRA_ARGS | Additional Arguments that will be used from Ansible | "" |=== .Ansible Collection [source,yaml] ---- include::{sourcedir}/IaC/ansible.gitlab-ci.yml[] ----