forked from redhat-cop/agnosticd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lifecycle.yml
39 lines (32 loc) · 982 Bytes
/
lifecycle.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
34
35
36
37
38
39
---
# This file is the default playbook for common actions.
# You should implement those actions in your config if you
# need a specific process.
- import_playbook: setup_runtime.yml
- name: Run stop/start/status/... actions
hosts: localhost
connection: local
gather_facts: False
become: no
tasks:
- fail:
msg: "guid and env_type must be defined"
when: >-
guid is not defined or guid == ''
or env_type is not defined or env_type == ''
- when: project_tag is not defined
set_fact:
project_tag: "{{ env_type }}-{{ guid }}"
- fail:
msg: "ACTION is not defined"
when: ACTION is not defined
- when: >-
guid is not defined
or guid == ''
or guid == '*'
fail:
msg: variable 'guid' must be defined and not empty
- when: cloud_provider == 'ec2'
include_tasks: lifecycle_ec2.yml
- when: cloud_provider == 'osp'
include_tasks: lifecycle_osp.yml