-
Notifications
You must be signed in to change notification settings - Fork 8
/
main.yml
48 lines (40 loc) · 1.15 KB
/
main.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
- hosts: pulsarservers
handlers:
- name: restart pulsar
become: yes
service:
name: pulsar
enabled: yes
state: restarted
tasks:
- name: import ssh tasks
include_tasks: ssh.yml
- name: import cron tasks
include_tasks: cron.yml
- name: import scripts tasks
include_tasks: scripts.yml
- name: import metrics tasks
include_tasks: metrics.yml
- name: Create container image cache path
file:
path: "{{ pulsar_container_image_cache_path }}"
state: directory
mode: '0775'
- name: Copy Pulsar application configuration file
template:
src: "{{ inventory_hostname }}/app.yml.j2"
dest: "{{ pulsar_root_path }}/config/app.yml"
force: yes
backup: yes
notify: restart pulsar
- name: Apply patch to multiple files under basedir
patch:
src: "{{ item.src }}"
basedir: "{{ item.basedir }}"
strip: 1
state: "{{ item.state }}"
backup: "{{ item.backup }}"
loop: "{{ patches_to_apply }}"
when: apply_patches | bool
notify: restart pulsar
ignore_errors: yes