ansible-dockerswarm
ansible-dockerswarm copied to clipboard
list, add and remove of labels does not work with ec2 instances
Hi,
When deploying to ec2-instances the {{ ansible_hostname }} that is returned by Ansible is a shortened version, which makes the following tasks fail.
- name: Get list of labels ...
- name: Remove labels from swarm node ...
- name: Asign labels to swarm nodes | if any ...
Example: returned value by ansible in var {{ ansible_hostname }} = ip-10-210-154-89
value required by swarm ip-10-210-154-89.us-west-1.compute.internal
Ansible provides the fqdn in a var called {{ ansible_fqdn }}
I updated the above tasks to use {{ ansible_fqdn }} and this worked. Thanks, Chris
It can't work because the version you get with ansible-galaxy install atosatto.docker-swarm is not the version shown here. The tasks are missing on the galaxy. The owner needs to update it on ansible-galaxy.
Check out your $HOME/.ansible/roles/atosatto.docker-swarm/tasks/swarm_cluster.yml