Skip to content

Instantly share code, notes, and snippets.

@markuman
Created December 18, 2018 11:41
Show Gist options
  • Save markuman/1f0f6dd0e02bf0e2deeb5314125e2641 to your computer and use it in GitHub Desktop.
Save markuman/1f0f6dd0e02bf0e2deeb5314125e2641 to your computer and use it in GitHub Desktop.
- name: create empty security group for ECS Instances
ec2_group:
name: ECS_ACCESS
description: access ECS Instances
region: eu-central-1
state: present
vpc_id: vpc-d04703b8
register: ecsinstance
- name: print ecs instance security group id
command: echo "security group id for ecs instances " "{{ item }}"
with_items: "{{ ecsinstance.group_id }}"
- set_fact:
ecs_sg: "{{ item }}"
cacheable: true
with_items: "{{ ecsinstance.group_id }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment