Skip to content

Instantly share code, notes, and snippets.

@robbwagoner
Last active December 9, 2015 18:08
Show Gist options
  • Save robbwagoner/4ac02558b088c6c55f69 to your computer and use it in GitHub Desktop.
Save robbwagoner/4ac02558b088c6c55f69 to your computer and use it in GitHub Desktop.
ec2-facts Ansible role with derived facts
---
ec2_facts_vpc_network_prefix: "172."
# derived facts
ansible_ec2_in_vpc: no
---
- ec2_facts:
- set_fact:
ansible_ec2_in_vpc: yes
when: ansible_ec2_local_ipv4 | match(ec2_facts_vpc_network_prefix)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment