#
# KCLS Evergreen Deployment Ansible Playbook
+# single-server instances (e.g. 'localhost') perform all actions.
+# and are assumed to not require attach/detach
+- hosts: 'single'
+ vars_files:
+ - vars.yml
+ - credentials.yml
+ tasks:
+ - include: plays/pinghost.yml
+ when: ping_host
+ - include: plays/stopweb.yml
+ when: stop_web or stop_all
+ - include: plays/stopsip.yml
+ when: stop_sip or stop_all
+ - include: plays/stoputil.yml
+ when: stop_util or stop_all
+ - include: plays/stopeg.yml
+ when: stop_eg or stop_all
+ - include: plays/deploy.yml
+ when: deploy
+ - include: plays/starteg.yml
+ when: start_eg or start_all
+ - include: plays/startweb.yml
+ when: start_web or start_all
+ - include: plays/startsip.yml
+ when: start_sip or start_all
+ - include: plays/startutil.yml
+ when: start_util or start_all
+
- hosts: 'bricks'
serial: '{{serial}}'
vars_files:
- include: plays/stopsip.yml
when: stop_sip or stop_all
- include: plays/stopeg.yml
- when:
- - stop_eg or stop_all
- # Avoid running duplicate commands on single-server setups.
- # e.g. dev servers
- - "'bricks' not in group_names"
+ when: stop_eg or stop_all
- include: plays/deploy.yml
- when:
- - deploy
- - "'bricks' not in group_names"
+ when: deploy
- include: plays/starteg.yml
- when:
- - start_eg or start_all
- - "'bricks' not in group_names"
+ when: start_eg or start_all
- include: plays/startsip.yml
when: start_sip or start_all
- include: plays/stoputil.yml
when: stop_util or stop_all
- include: plays/stopeg.yml
- when:
- - stop_eg or stop_all
- - "'bricks' not in group_names"
- - "'sips' not in group_names"
+ when: stop_eg or stop_all
- include: plays/deploy.yml
- when:
- - deploy
- - "'bricks' not in group_names"
- - "'sips' not in group_names"
+ when: deploy
- include: plays/starteg.yml
- when:
- - start_eg or start_all
- - "'bricks' not in group_names"
- - "'sips' not in group_names"
+ when: start_eg or start_all
- include: plays/startutil.yml
when: start_util or start_all