This repository has been archived by the owner on Jun 11, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
test.yml
80 lines (69 loc) · 1.88 KB
/
test.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
- hosts: localhost
connection: local
tasks:
- name: create the project
reminder_project:
addr: 127.0.0.1:8000
state: present
name: "awesome"
register: res
- debug:
var: res
- name: create an environment in the project
reminder_environment:
addr: 127.0.0.1:8000
state: present
project_name: "awesome"
name: "staging"
register: res
- debug:
var: res
- name: retrieve the id of the reminder object for the project
set_fact:
reminder_id: "{{ res.environment.reminder.id }}"
- debug:
var: reminder_id
- name: create a stack in enviroment
reminder_stack:
addr: 127.0.0.1:8000
state: present
reminder_id: "{{ reminder_id }}"
name: "kafka"
logo: "kafka.png"
category: "MAIN"
hosts:
- kafka-a-01.example.com
urls:
- http://kafka-a-01.example.com/
register: res
- debug:
var: res
- name: update a stack in enviroment
reminder_stack:
addr: 127.0.0.1:8000
state: present
reminder_id: "{{ reminder_id }}"
name: "confluent-kafka"
logo: "kafka.png"
category: "MAIN"
hosts:
- kafka-a-01.example.com
- kafka-a-01.example.com
urls:
- http://kafka-a-01.example.com/
- http://kafka-a-02.example.com/
register: res
- name: ensure stack listed in group vars are created
reminder_stack:
addr: 127.0.0.1:8000
state: present
reminder_id: "{{ reminder_id }}"
name: "{{ item.name }}"
hosts: "{{ item.hosts }}"
urls: "{{ item.urls }}"
logo: "{{ item.logo }}"
category: "{{ item.category }}"
with_items: "{{ stacks }}"
register: res
- debug:
var: res