equal
deleted
inserted
replaced
1 --- |
|
2 |
|
3 - name: create node data dir |
|
4 become: yes |
|
5 file: |
|
6 path: "{{item}}" |
|
7 state: "directory" |
|
8 owner: "{{node_user}}" |
|
9 group: "{{node_user}}" |
|
10 mode: "0770" |
|
11 with_items: |
|
12 - "{{node_data_dir}}" |
|
13 - "{{node_log_dir}}" |
|
14 - "{{node_conf_dir}}" |
|
15 |
|
16 - name: configure node |
|
17 become: yes |
|
18 template: |
|
19 src: "{{node_conf_template}}" |
|
20 dest: "{{node_conf_dir}}/{{node_type}}.conf" |
|
21 owner: "{{node_user}}" |
|
22 group: "{{node_user}}" |
|
23 mode: "0644" |
|
24 notify: restart node |
|
25 |
|
26 - name: install node service |
|
27 become: yes |
|
28 template: |
|
29 src: "{{node_service_template}}" |
|
30 dest: "/lib/systemd/system/{{node_type}}.service" |
|
31 mode: "0644" |
|
32 notify: restart node |
|
33 |
|
34 - name: ensure node is started |
|
35 become: yes |
|
36 systemd: service="{{node_type}}.service" enabled="yes" state="started" daemon_reload="yes" |
|