list, add and remove of labels does not work with ec2 instances #43
Open
Description
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
Metadata
Assignees
Labels
No labels