OUTPUT
$ ansible-playbook test-playbook.yml
[WARNING]: Invalid characters were found in group names and automatically replaced, use -vvvv to see details
PLAY [provision EC2] ***************************************************************************************************************************************************************
TASK [ec2 : Provision EC2] *********************************************************************************************************************************************************
changed: [localhost]
TASK [ec2 : Add new instance to host group] ****************************************************************************************************************************************
changed: [localhost] => (item={u'root_device_type': u'ebs', u'private_dns_name': u'ip-10-69-122-181.eu-west-1.compute.internal', u'cpu_options': {u'threads_per_core': 1, u'core_count': 1}, u'source_dest_check': True, u'monitoring': {u'state': u'disabled'}, u'subnet_id': u'subnet-065072b7239148454', u'ebs_optimized': False, u'state': {u'code': 16, u'name': u'running'}, u'security_groups': [{u'group_id': u'sg-0fc0a74cc52d80915', u'group_name': u'common-webapp-secgroup'}], u'client_token': u'c3cd3468213d4701b137c7529ba2296a', u'virtualization_type': u'hvm', u'root_device_name': u'/dev/xvda', u'tags': {u'Name': u'demo_ec2_deletemeplease'}, u'key_name': u'lsa-common-key', u'image_id': u'ami-04d5cc9b88f9d1d39', u'ena_support': True, u'hibernation_options': {u'configured': False}, u'capacity_reservation_specification': {u'capacity_reservation_preference': u'open'}, u'public_dns_name': u'', u'block_device_mappings': [{u'ebs': {u'status': u'attached', u'delete_on_termination': True, u'attach_time': u'2020-05-06T07:41:42+00:00', u'volume_id': u'vol-078f8b905e3818cb7'}, u'device_name': u'/dev/xvda'}], u'metadata_options': {u'http_endpoint': u'enabled', u'state': u'applied', u'http_tokens': u'optional', u'http_put_response_hop_limit': 1}, u'placement': {u'availability_zone': u'eu-west-1b', u'tenancy': u'default', u'group_name': u''}, u'ami_launch_index': 0, u'hypervisor': u'xen', u'network_interfaces': [{u'status': u'in-use', u'description': u'', u'subnet_id': u'subnet-065072b7239148454', u'interface_type': u'interface', u'ipv6_addresses': [], u'network_interface_id': u'eni-0168283f7fda6cca7', u'private_dns_name': u'ip-10-69-122-181.eu-west-1.compute.internal', u'attachment': {u'status': u'attached', u'device_index': 0, u'attachment_id': u'eni-attach-054ae489dc970a477', u'delete_on_termination': True, u'attach_time': u'2020-05-06T07:41:41+00:00'}, u'private_ip_addresses': [{u'private_ip_address': u'10.69.122.181', u'private_dns_name': u'ip-10-69-122-181.eu-west-1.compute.internal', u'primary': True}], u'mac_address': u'06:19:c8:8b:88:d2', u'private_ip_address': u'10.69.122.181', u'vpc_id': u'vpc-07dd9cf9b9deca621', u'groups': [{u'group_id': u'sg-0fc0a74cc52d80915', u'group_name': u'common-webapp-secgroup'}], u'source_dest_check': True, u'owner_id': u'933762258141'}], u'launch_time': u'2020-05-06T07:41:41+00:00', u'instance_id': u'i-07464f7a1b6593fbd', u'instance_type': u't2.micro', u'architecture': u'x86_64', u'state_transition_reason': u'', u'private_ip_address': u'10.69.122.181', u'vpc_id': u'vpc-07dd9cf9b9deca621', u'product_codes': []})
[WARNING]: Could not match supplied host pattern, ignoring: launched
PLAY [config service inside EC2] ***************************************************************************************************************************************************
skipping: no hosts matched
PLAY RECAP *************************************************************************************************************************************************************************
localhost : ok=2 changed=2 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
Nicola