I am trying to use the following configuration in hosts.yml
all:
hosts:
177.177.188.199:
177.177.188.200:
vars:
ansible_connection= {{ ansible_conn }}
ansible_user= {{ ansible_usr }}
ansible_ssh_common_args= {{ common_args }}
and I am having two problems:
- No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost
does not match ‘all’
Which is weird because in the playbook I used all
It does work when I used INI
[all]
177.177.188.199 ansible_connection=“{{ ansible_conn }}” ansible_user=“{{ ansible_usr }}” ansible_ssh_common_args=“{{ common_args }}”
- When I use the variables in INI common_args is not found. I declared these in host_vars
ansible_conn: ssh
ansible_usr: user
common_args: ‘-o ProxyCommand=“ssh -W %h:%p -q user@vpn”’
And it cannot solve the common_args
I wrote them with ’ and with "
Does anyone understand how to make the host.yml? and why the proxy declared in variables doesnt work
Thanks
Jacque