From: Justin Wind Date: Tue, 18 Apr 2017 20:40:18 +0000 (-0700) Subject: allow different name for management module X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=2b14f2bf46bb3b58bf1c101d1eed8256fb9a4d37;p=awsible allow different name for management module --- diff --git a/roles/aws-management-infrastructure/tasks/main.yml b/roles/aws-management-infrastructure/tasks/main.yml index 7db2e1a..bc4d6b0 100644 --- a/roles/aws-management-infrastructure/tasks/main.yml +++ b/roles/aws-management-infrastructure/tasks/main.yml @@ -12,7 +12,7 @@ vpc_id: "{{ vpc.vpc.id }}" region: "{{ vpc_region }}" state: present - name: management-elb + name: "{{ module }}-elb" description: "sg for internal elb for monitoring management" purge_rules: false rules: @@ -29,26 +29,26 @@ vpc_id: "{{ vpc.vpc.id }}" region: "{{ vpc_region }}" state: present - name: management + name: "{{ module }}" description: "sg for management" purge_rules: false rules: - proto: all - group_name: management + group_name: "{{ module }}" - proto: all - group_name: management-elb + group_name: "{{ module }}-elb" register: sg_management - name: elb management-int-elb ec2_elb_lb: region: "{{ vpc_region }}" state: present - name: management-int-elb + name: "{{ module }}-int-elb" cross_az_load_balancing: yes scheme: internal subnets: "{{ MANAGEMENT_SUBNET }}" security_group_names: - - management-elb + - "{{ module }}-elb" listeners: - protocol: tcp load_balancer_port: 22 @@ -67,13 +67,14 @@ region: "{{ vpc_region }}" name: "{{ MANAGEMENT_KEY_NAME }}" key_material: "{{ item }}" - with_file: keys/{{ MANAGEMENT_KEY_NAME }}.pub + with_file: ../keys/{{ MANAGEMENT_KEY_NAME }}.pub - name: management iam iam: - name: management + name: "{{ module }}" iam_type: role state: present + register: role_management # this is only ansible 2.3+ # - name: management role policies @@ -84,6 +85,9 @@ # - arn:aws:iam::{{ ACCT_ID }}:policy/base-policy # - arn:aws:iam::{{ ACCT_ID }}:policy/management-policy +- debug: + msg: "If next step fails, wait a little while and retry." + - include_role: name: launchconfig vars: