June 2020
Intermediate to advanced
410 pages
9h 52m
English
Now that Ansible is able to connect to your AWS environment, you can proceed with the actual playbook by following these steps:
---- hosts: localhost tasks: - name: Ensure key pair is present ec2_key: name: fale key_material: "{{ lookup('file', '~/.ssh/fale.pub') }}" - name: Gather information of the EC2 VPC net in eu-west-1 ec2_vpc_net_facts: region: eu-west-1 register: aws_simple_net - name: Gather information of the EC2 VPC subnet in eu-west-1 ec2_vpc_subnet_facts: region: eu-west-1 filters: vpc-id: '{{ aws_simple_net.vpcs.0.id }}' register: aws_simple_subnet - name: Ensure wssg Security Group is present ec2_group: name: wssg description: Web Security ...