---

- include_vars: "vars/{{ wimpy_deploy_strategy }}.yml"

- include: find_latest_ami.yml
  when: wimpy_aws_ami_id is undefined

- include: find_previous_cloudformation.yml
  when:
    - wimpy_destroy_previous_asg
    - wimpy_deploy_strategy != rolling_asg

- include: create_github_deployment.yml
  when: wimpy_github_project_url != ''

- include: create_launchconfiguration.yml

- include: launch_cloudformation_with_elb_dns.yml
  when: wimpy_needs_elb

- include: launch_cloudformation.yml
  when: not wimpy_needs_elb

- include: scaling_policies.yml

- include: clean_previous_cloudformation.yml
  with_items: "{{ previous_asgs.results }}"
  when:
    - wimpy_destroy_previous_asg
    - wimpy_deploy_strategy != rolling_asg

- include: notify.yml

---

- include_vars: "vars/{{ wimpy_deploy_strategy }}.yml"

- include: find_latest_ami.yml
  when: wimpy_aws_ami_id is undefined

- include: find_previous_cloudformation.yml
  when:
    - wimpy_destroy_previous_asg
    - wimpy_deploy_strategy != 'rolling_asg'

- include: create_github_deployment.yml
  when: wimpy_github_project_url != ''

- include: create_launchconfiguration.yml

- include: launch_cloudformation_with_elb_dns.yml
  when: wimpy_needs_elb

- include: launch_cloudformation.yml
  when: not wimpy_needs_elb

- include: scaling_policies.yml

- include: clean_previous_cloudformation.yml
  with_items: "{{ previous_asgs.results }}"
  when:
    - wimpy_destroy_previous_asg
    - wimpy_deploy_strategy != 'rolling_asg'

- include: notify.yml

Deploy strategy must go between quotes
Deploy strategy must go between quotes
