Which connection variables can you set per host in inventory?
BeginnerConceptInventory
Answer
The common ones:
ansible_host— real address/DNS name if different from the inventory nameansible_port,ansible_user,ansible_passwordansible_ssh_private_key_fileansible_connection—ssh,local,winrm,docker…ansible_become,ansible_become_user,ansible_become_methodansible_python_interpreteransible_ssh_common_args— e.g. a ProxyJump through a bastion
db1 ansible_host=10.0.2.5 ansible_user=ec2-user ansible_ssh_private_key_file=~/.ssh/prod.pem
More on Inventory
What is an inventory and why does Ansible need one?BeginnerWhat are the INI and YAML inventory formats and how do they differ?BeginnerHow do you create groups of groups?BeginnerExplain host patterns: `:`, `:&`, `:!` and wildcards.IntermediateWhat are `group_vars` and `host_vars` directories?IntermediateHow do you define a range of hosts in an inventory?Beginner