91.IaC
유용한 Ansible vars(cfg value)
왕영주
2020. 11. 4. 21:45
- ansible_port
The ssh port number, if not 22 - ansible_user
The default ssh user name to use. - ansible_ssh_pass
The ssh password to use (never store this variable in plain text; always use a vault. See Variables and Vaults) - ansible_ssh_private_key_file
Private key file used by ssh. Useful if using multiple keys and you don’t want to use SSH agent. - ansible_become
Equivalent to ansible_sudo or ansible_su, allows to force privilege escalation - ansible_become_method
Allows to set privilege escalation method - ansible_become_user
Equivalent to ansible_sudo_user or ansible_su_user, allows to set the user you become through privilege escalation
inventory vars tip
자주 쓰는 것들
[all:vars]
ansible_connection=ssh
ansible_user=root
ansible_ssh_pass=test123
ansible_become_pass=test123
ansible_ssh_common_args='-o StrictHostKeyChecking=no'
Ansible config tip
# cat ansible.cfg
[defaults]
host_key_checking = False
반응형