Files
ansible-gitea/inventory/production.yml
T
2025-12-05 13:52:24 +07:00

14 lines
828 B
YAML

all:
hosts:
prod_server:
ansible_host: "{{ server_host if server_host is defined and server_host != '' else '10.252.252.10' }}"
ansible_port: "{{ server_port if server_port is defined and server_port != '' else '22' }}"
ansible_user: "{{ server_user }}"
# Cấu hình SSH linh động - password hoặc SSH key
ansible_password: "{{ server_password if auth_method == 'password' else omit }}"
ansible_ssh_private_key_file: "{{ ssh_key_path if (auth_method == 'ssh_key' and ssh_key_path != '') else omit }}"
ansible_become_password: "{{ server_become_password if auth_method == 'password' else omit }}"
ansible_sudo_pass: "{{ server_become_password if auth_method == 'password' else omit }}"
vars:
# Load vault variables
# vault_file: "defaults/vault/production.yml"