---
- hosts: localhost
  connection: local
  gather_facts: no
  become: no
  vars_files:
  - vars/main.yaml
  vars:
    vpc_subnet_azs: "{{ lookup('ec2_zones_by_region', region) }}"
  roles:
  # Upload ssh-key
  - { role: ssh-key, when: create_key == "yes" }
  - { role: cfn-outputs, when: create_vpc == "no" and add_node == "yes" or add_node == "no" and deploy_crs is defined }
  # Create VPC and subnets in multiple AZ
  - pre-install-check
  - cloudformation-infra
