14 lines
850 B
YAML
14 lines
850 B
YAML
---
|
|
# ── SSH connection ─────────────────────────────────────────────────────────────
|
|
# Credentials are injected from GitLab CI/CD Variables:
|
|
# ANSIBLE_SSH_USER — remote user
|
|
# ANSIBLE_SSH_PASS — remote user password
|
|
# ANSIBLE_BECOME_PASS — sudo password (defaults to SSH password when not set)
|
|
ansible_user: "{{ lookup('env', 'ANSIBLE_SSH_USER') | mandatory }}"
|
|
ansible_password: "{{ lookup('env', 'ANSIBLE_SSH_PASS') | mandatory }}"
|
|
ansible_become: true
|
|
ansible_become_method: sudo
|
|
ansible_become_pass: "{{ lookup('env', 'ANSIBLE_BECOME_PASS') | default(lookup('env', 'ANSIBLE_SSH_PASS'), true) }}"
|
|
|
|
ansible_ssh_common_args: "-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"
|