Last active
November 7, 2016 21:18
-
-
Save ralfbergs/4cfffc0d10c85806ff4035af6cb21c10 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- set_fact: | |
myenv: "{{ env }}" | |
when: myenv is not defined | |
- name: "Find {{ myenv }} VPC id" | |
ec2_vpc_net_facts: | |
region: "{{ region }}" | |
filters: | |
"tag:Name": "{{ owner }}_vpc_{{ myenv }}" | |
register: aws_find_vpc_facts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
env_devmgmt_name: "devmgmt" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
dependencies: | |
- { role: aws.find-vpc, env: "devenvs", when: env == env_devmgmt_name } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: localhost | |
vars: | |
env: "{{ env_devmgmt_name }}" | |
roles: | |
- aws/create |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TASK [debug] ******************************************************************* | |
ok: [localhost] => { | |
"env": "devmgmt" | |
} | |
TASK [debug] ******************************************************************* | |
ok: [localhost] => { | |
"env_devmgmt_name": "devmgmt" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment