I have ansible 2.4.2.x running and an inventory file which has "ansible_ssh_host etc." params.Normally ansible_ssh_host must be ansible_host as it is deprecated. deprecated .

when I play with ansible_host parameter I get this

"msg": "AnsibleUndefinedVariable: 'dict object' has no attribute 'ansible_ssh_host'"}

Here is the latest doc.It is "ansible_host" and no mention of deprecated anymore.ansible latest doc

  • grep over all the files to see if the env is set in another place. grep 'ansible_ssh_host' . -R – Rabin Mar 27 '18 at 8:51
  • "ansible -i inventory myhost -m setup | grep ansible_ssh_host" gives no output. with "grep ansible_host" it is what I expect.I have my local "inventory" file. – hakkican Mar 27 '18 at 9:32
  • paste the results of ansible-config dump --only-changed Otherwise, mention any settings you have changed/added/removed in ansible.cfg (or using the ANSIBLE_* environment variables). – Rabin Mar 27 '18 at 10:18
  • actually I did not change anything in my custon ansible.cfg file which make reference to my custom inventory file.In this I made change to make it compatible with current ansible version which ansible says they are deprecated for now.Is there a way to verify my custom inventory file runs with proper ansible version? what s happening is is so weird. – hakkican Mar 28 '18 at 5:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.