- hosts: minion
  connection: local
  vars:
    enable_streaming_logs: "{{ lookup('env', 'ENABLE_STREAMING_LOGS') }}"
    enable_sumologic: "{{ lookup('env', 'ENABLE_SUMOLOGIC') }}"
  roles:
    - common
    - swap
    - docker
    - aws_ecs
    - { role: logspout, when: enable_streaming_logs == 'true' }
    - { role: sumologic, when: enable_sumologic == 'true' }
    - newrelic
- hosts: controller
  connection: local
  vars:
    enable_streaming_logs: "{{ lookup('env', 'ENABLE_STREAMING_LOGS') }}"
    enable_sumologic: "{{ lookup('env', 'ENABLE_SUMOLOGIC') }}"
  roles:
    - common
    - swap
    - docker
    - aws_ecs
    - empire
    - newrelic
    - { role: sumologic, when: enable_sumologic == 'true' }
- hosts: empire_ami
  connection: local
  roles:
    - {role: build_ami, tags: ['build_ami']}
    - common
    - docker
    - aws_ecs
    - empire
    - newrelic

- hosts: minion
  connection: local
  vars:
    enable_streaming_logs: "{{ lookup('env', 'ENABLE_STREAMING_LOGS') }}"
    enable_sumologic: "{{ lookup('env', 'ENABLE_SUMOLOGIC') }}"
    mem2x: "{{ ansible_memtotal_mb * 1024 * 2 }}"
  roles:
    - common
    - swap
    - docker
    - aws_ecs
    - { role: logspout, when: enable_streaming_logs == 'true' }
    - { role: sumologic, when: enable_sumologic == 'true' }
    - newrelic
- hosts: controller
  connection: local
  vars:
    enable_streaming_logs: "{{ lookup('env', 'ENABLE_STREAMING_LOGS') }}"
    enable_sumologic: "{{ lookup('env', 'ENABLE_SUMOLOGIC') }}"
    mem2x: "{{ ansible_memtotal_mb * 1024 * 2 }}"
  roles:
    - common
    - swap
    - docker
    - aws_ecs
    - empire
    - newrelic
    - { role: sumologic, when: enable_sumologic == 'true' }
- hosts: empire_ami
  connection: local
  roles:
    - {role: build_ami, tags: ['build_ami']}
    - common
    - docker
    - aws_ecs
    - empire
    - newrelic

Add swap on ephemeral storage.
Add swap on ephemeral storage.
