From 3658971fdd29384720c6e44b172fb27d883ae3fe Mon Sep 17 00:00:00 2001 From: Justin Wind Date: Mon, 13 Mar 2017 10:10:31 -0700 Subject: [PATCH] do dependant infrastructure tasks on non-root localhost --- .../aws-management-infrastructure/defaults/main.yml | 1 - roles/aws-vpc-infrastructure/tasks/main.yml | 12 ++++++------ roles/aws-vpc/tasks/main.yml | 2 ++ roles/common-infrastructure/tasks/main.yml | 2 ++ 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/roles/aws-management-infrastructure/defaults/main.yml b/roles/aws-management-infrastructure/defaults/main.yml index 1830f02..0db972b 100644 --- a/roles/aws-management-infrastructure/defaults/main.yml +++ b/roles/aws-management-infrastructure/defaults/main.yml @@ -4,4 +4,3 @@ MANAGEMENT_EVENT_QUEUE_SHORT: management MANAGEMENT_EVENT_FAILURE_QUEUE: "{{ MANAGEMENT_EVENT_QUEUE }}-failed" MANAGEMENT_NOTICE_TOPIC: management-notifications MANAGEMENT_NOTICE_TOPIC_SHORT: notices -MANAGEMENT_KEY_NAME: management \ No newline at end of file diff --git a/roles/aws-vpc-infrastructure/tasks/main.yml b/roles/aws-vpc-infrastructure/tasks/main.yml index af68180..17a5800 100644 --- a/roles/aws-vpc-infrastructure/tasks/main.yml +++ b/roles/aws-vpc-infrastructure/tasks/main.yml @@ -31,12 +31,12 @@ az: "{{ item.az }}" tags: "{{ item.resource_tags }}" -- name: Access/NAT EIP - ec2_eip: - in_vpc: yes - region: "{{ vpc_region }}" - reuse_existing_ip_allowed: yes - register: access_eip +# - name: Access/NAT EIP +# ec2_eip: +# in_vpc: yes +# region: "{{ vpc_region }}" +# reuse_existing_ip_allowed: yes +# register: access_eip # As of ansible 2.2.1.0, it cannot set anything on the main route table # due to limitations of the underlying boto libarary. diff --git a/roles/aws-vpc/tasks/main.yml b/roles/aws-vpc/tasks/main.yml index e92a53a..da1f4f5 100644 --- a/roles/aws-vpc/tasks/main.yml +++ b/roles/aws-vpc/tasks/main.yml @@ -7,6 +7,8 @@ tags: ['check_vars'] - name: VPC + delegate_to: localhost + become: no ec2_vpc_net: state: present name: "{{ vpc_name }}" diff --git a/roles/common-infrastructure/tasks/main.yml b/roles/common-infrastructure/tasks/main.yml index 6d40a64..0d3910b 100644 --- a/roles/common-infrastructure/tasks/main.yml +++ b/roles/common-infrastructure/tasks/main.yml @@ -1,5 +1,7 @@ --- - name: sg ssh + delegate_to: localhost + become: no ec2_group: vpc_id: "{{ vpc.vpc.id }}" region: "{{ vpc_region }}" -- 2.45.2