-
Notifications
You must be signed in to change notification settings - Fork 5
/
build-image.yml
36 lines (33 loc) · 964 Bytes
/
build-image.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
- name: Build filebeat images and upload for app servers
hosts: elk-clients
environment:
USER: "{{user}}"
GROUP: "{{group}}"
DOCKER_PW: "{{lookup('env','DOCKER_PW')}}"
DOCKER_USER: "{{lookup('env' , 'DOCKER_USER')}}"
DOCKER_URL: "{{lookup('env', 'DOCKER_URL')}}"
FILEBEAT_IMAGE: "{{filebeat_image}}"
tasks:
- import_role:
name: filebeat
tasks_from: build-and-upload-image.yml
tags:
- build-fb
- name: Build ELK images and upload for ELK server
hosts: elk
environment:
USER: "{{user}}"
GROUP: "{{group}}"
DOCKER_PW: "{{lookup('env','DOCKER_PW')}}"
DOCKER_USER: "{{lookup('env' , 'DOCKER_USER')}}"
DOCKER_URL: "{{lookup('env', 'DOCKER_URL')}}"
ES_IMAGE: "{{es_image}}"
LS_IMAGE: "{{ls_image}}"
KB_IMAGE: "{{kb_image}}"
ELK_HOME: "{{role_path}}/files"
tasks:
- import_role:
name: elk
tasks_from: build-and-upload-image.yml
tags:
- build-elk