blob: e912e0711773f270fb12a0977a66f1235419b7f1 [file] [log] [blame]
---
- name: Normalized name for public address
cache:
key: 'public_address'
value: '{{ inventory_hostname }}'
- block:
- name: Update cache for public ip on AWS
ec2_facts:
when: ansible_ec2_public_ipv4 is not defined
- name: Normalized name for public address on AWS
cache:
key: 'public_address'
value: '{{ ansible_ec2_public_ipv4 | default(inventory_hostname) }}'
when: ansible_bios_version is defined and ansible_bios_version | search('amazon')