228
|
1 |
--- |
|
2 |
|
|
3 |
- name: add bin user |
|
4 |
become: yes |
|
5 |
user: name="{{bin_user}}" shell="/bin/false" system="yes" |
|
6 |
|
|
7 |
- name: install bin binary |
|
8 |
become: yes |
|
9 |
get_url: |
|
10 |
url: "{{bin_url}}" |
|
11 |
dest: "/usr/local/bin/bin" |
|
12 |
mode: "0755" |
|
13 |
notify: restart service |
|
14 |
|
|
15 |
- name: install systemd service |
|
16 |
become: yes |
|
17 |
template: |
|
18 |
src: "[email protected]" |
|
19 |
dest: "/lib/systemd/system/[email protected]" |
|
20 |
notify: restart service |
|
21 |
|
|
22 |
- name: ensure service is started |
|
23 |
become: yes |
|
24 |
systemd: name="bin@{{bin_port}}.service" enabled="yes" state="started" |