After some hints from the stackoverflow and the Ansible docs I figured it out.
The problem is that the hostname for an ec2 instance is so long that makes the socket name too long to use. You can change the ansible config to use a shorter format, but this was not enough. The easiest solution was to use the IP address in the hosts file instead of the public DNS name.
Other solutions could include changing your /etc/hosts file, or to add a CNAME in DNS.
If you work with EC2 instances I do recommend to change your /etc/ansible/ansible.cfg by uncommenting the line below. This may help in some situations.
control_path = %(directory)s/%%h-%%r
This also may become a non-issue when I start using the EC2 tools for Ansible.
No comments:
Post a Comment