forked from project-sunbird/sunbird-data-pipeline-devops
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdp_kafka_provision.yml
40 lines (40 loc) · 1.11 KB
/
dp_kafka_provision.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
---
- hosts: processing-cluster-kafka
pre_tasks:
- name: Create ecosytem group
become: yes
group:
state: present
name: "{{ ecosystem_group }}"
system: yes
- name: Create ecosystem user
become: yes
user:
state: present
name: "{{ ecosystem_user }}"
comment: ecosystem user
system: yes
createhome: yes
group: "{{ ecosystem_group }}"
- service: name=monit state=stopped
become: yes
ignore_errors: true
- name: Uncompressing and copying to system path
unarchive:
src: https://sunbirdpublic.blob.core.windows.net/installation/jre-8u144-linux-x64.tar.gz
dest: /opt/
remote_src: yes
keep_newer: yes
become: yes
register: tar
- name: Updating java jre to system path
become: yes
shell: update-alternatives --install /usr/bin/java java /opt/jre1.8.0_144/bin/java 9999
remote_user: "{{ ecosystem_user }}"
become: yes
roles:
- ansible-kafka-upgrade
post_tasks:
- service: name=monit state=started
become: yes
ignore_errors: true