Hello,
i have a strange problem on Ansible 2.0, my playbook couldn’t resolve anymore the fqdn of my inventory.
I can ssh to the machines in my inventory.
I tried using an inventory file or specify the hosts with the -i option.
I can run the playbook using the ip @.
I’m scratching my head about what is happening, do you have any clues?
Problem disappeared but finally reappeared after a few successful runs!
I can always ssh on the impacted hosts.
Don’t know where to search? Is Ansible has some sort of dns cache or something?
I doubt ansible has its own dns cache.
I forget which distro it was now but a while back i used to have to occasionally restart nscd service when I had dns problems like this.
Hope this helps,
Jon
Hello,
the problem was not DNS related, it was the hostname of my machines that were too long.
He did solve the problem by adding this to my ansible.cfg:
control_path = %(directory)s/%%h-%%r
#control_path = %(directory)s/ansible-ssh-%%h-%%p-%%r
Hope this will help!