-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathrollback.yml
33 lines (28 loc) · 1021 Bytes
/
rollback.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
---
# This playbook rolls back all static services:
# 1. point the "current" static service to the stack that was pointed by the "previous" static service,
# 2. point the "next" static service to the stack that was pointed by the "current" static service,
- name: Rollback the previous stack
hosts: local
gather_facts: false
pre_tasks:
- name: Check configuration
ansible.builtin.import_tasks: tasks/check_configuration.yml
- name: Check apps filter
ansible.builtin.import_tasks: tasks/check_apps_filter.yml
tasks:
- name: Display playbook name
ansible.builtin.debug: msg="==== Starting rollback playbook ===="
tags: rollback
- name: Set vars
ansible.builtin.import_tasks: tasks/set_vars.yml
tags: rollback
- name: Run tasks for apps
ansible.builtin.include_tasks: tasks/run_tasks_for_apps.yml
vars:
tasks:
- get_objects_for_app
- rollback_static_services
tags:
- static_service
- rollback