equal
deleted
inserted
replaced
|
1 --- |
|
2 |
|
3 - name: add ergo user |
|
4 become: yes |
|
5 user: name="ergo" |
|
6 |
|
7 - name: download ergo |
|
8 become: yes |
|
9 unarchive: |
|
10 remote_src: yes |
|
11 src: "{{ergo_url}}" |
|
12 dest: "/tmp" |
|
13 creates: "/tmp/{{ergo_tar_name}}/" |
|
14 |
|
15 - name: install ergo |
|
16 become: yes |
|
17 copy: |
|
18 src: "/tmp/{{ergo_tar_name}}/ergo" |
|
19 dest: "/usr/local/bin/" |
|
20 remote_src: yes |
|
21 owner: "root" |
|
22 group: "root" |
|
23 mode: "0755" |
|
24 notify: restart ergo |
|
25 |
|
26 - name: create ergo dirs |
|
27 become: yes |
|
28 file: |
|
29 path: "{{item}}/ergo" |
|
30 owner: "ergo" |
|
31 group: "ergo" |
|
32 mode: "0755" |
|
33 state: "directory" |
|
34 loop: |
|
35 - "/etc" |
|
36 - "/var" |
|
37 |
|
38 - name: configure ergo |
|
39 become: yes |
|
40 template: |
|
41 src: "config.yaml.j2" |
|
42 dest: "/etc/ergo/config.yaml" |
|
43 owner: "ergo" |
|
44 group: "ergo" |
|
45 mode: "0644" |
|
46 notify: reload ergo |
|
47 |
|
48 - name: copy motd file |
|
49 become: yes |
|
50 copy: |
|
51 src: "{{ergo_motd}}" |
|
52 dest: "/etc/ergo/motd" |
|
53 notify: reload ergo |
|
54 |
|
55 - name: install ergo service |
|
56 become: yes |
|
57 copy: |
|
58 src: "ergo.service" |
|
59 dest: "/lib/systemd/system/ergo.service" |
|
60 mode: "0644" |
|
61 notify: restart ergo |
|
62 |
|
63 - name: ensure ergo is started |
|
64 become: yes |
|
65 systemd: service="ergo.service" enabled="yes" state="started" daemon_reload="yes" |