Skip to content

Commit

Permalink
Update ec2 instance role name
Browse files Browse the repository at this point in the history
  • Loading branch information
hakbailey committed Dec 6, 2024
1 parent 31ef843 commit df2d70b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
22 changes: 11 additions & 11 deletions extensions/patterns/configure_ec2/playbooks/create_ec2_instance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@

- name: Create EC2 instance
ansible.builtin.include_role:
name: cloud.aws_ops.ec2_instance_create_delete
name: cloud.aws_ops.manage_ec2_instance
vars:
ec2_instance_create_delete_operation: create
ec2_instance_create_delete_instance_name: "{{ instance_name }}"
ec2_instance_create_delete_instance_type: "{{ instance_type }}"
ec2_instance_create_delete_ami_id: "{{ ami_id }}"
ec2_instance_create_delete_key_name: "{{ key_name }}"
ec2_instance_create_delete_vpc_subnet_id: "{{ ec2_networking_resources_subnet_result.subnet.id }}"
ec2_instance_create_delete_wait_for_state: "{{ wait_for_state | bool }}"
ec2_instance_create_delete_associate_security_groups: "{{ [sg_name] }}"
ec2_instance_create_delete_associate_eip: "{{ create_external_access_resources }}"
ec2_instance_create_delete_instance_tags: "{{ instance_tags | default('{}', true) | from_json }}"
manage_ec2_instance_operation: create
manage_ec2_instance_instance_name: "{{ instance_name }}"
manage_ec2_instance_instance_type: "{{ instance_type }}"
manage_ec2_instance_ami_id: "{{ ami_id }}"
manage_ec2_instance_key_name: "{{ key_name }}"
manage_ec2_instance_vpc_subnet_id: "{{ ec2_networking_resources_subnet_result.subnet.id }}"
manage_ec2_instance_wait_for_state: "{{ wait_for_state | bool }}"
manage_ec2_instance_associate_security_groups: "{{ [sg_name] }}"
manage_ec2_instance_associate_eip: "{{ create_external_access_resources }}"
manage_ec2_instance_instance_tags: "{{ instance_tags | default('{}', true) | from_json }}"
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
group/aws:
aws_region: "{{ aws_region }}"
tasks:
- name: Set ec2_instance_create_delete role vars
- name: Set manage_ec2_instance role vars
ansible.builtin.set_fact:
ec2_instance_create_delete_operation: delete
ec2_instance_create_delete_instance_name: "{{ instance_name }}"
ec2_instance_create_delete_key_name: "{{ key_name | default(omit, true) }}"
manage_ec2_instance_operation: delete
manage_ec2_instance_instance_name: "{{ instance_name }}"
manage_ec2_instance_key_name: "{{ key_name | default(omit, true) }}"

- name: Delete EC2 instance
ansible.builtin.include_role:
name: cloud.aws_ops.ec2_instance_create_delete
name: cloud.aws_ops.manage_ec2_instance

- name: Delete networking resources
ansible.builtin.include_role:
Expand Down

0 comments on commit df2d70b

Please sign in to comment.