]> git.somenet.org - root/pub/somesible.git/blob - roles/base/systemd/fail-mail/tasks/main.yml
[roles/base/systemd] ----- meta + defaults -----
[root/pub/somesible.git] / roles / base / systemd / fail-mail / tasks / main.yml
1 #####################################
2 ### someone's ansible provisioner ###
3 #####################################
4 # Part of: https://git.somenet.org/root/pub/somesible.git
5 # 2017-2024 by someone <someone@somenet.org>
6 #
7 ---
8 - name: copy unit-status-mail unit file
9   copy:
10     src: "{{item}}"
11     dest: "/etc/systemd/system/unit-status-mail@.service"
12   with_first_found:
13     - "{{lookup('env','PWD')}}/host_files/{{inventory_hostname}}/{{role_name}}/unit-status-mail.service"
14     - "{{lookup('env','PWD')}}/group_files/{{group_files_group}}/{{role_name}}/unit-status-mail.service"
15     - "{{lookup('env','PWD')}}/group_files/all/{{role_name}}/unit-status-mail.service"
16     - "default/unit-status-mail.service"
17
18
19 - name: copy systemd-unit-status-mail shell script
20   copy:
21     src: "{{item}}"
22     dest: "/bin/systemd-unit-status-mail.sh"
23     mode: 0755
24     owner: "root"
25     group: "root"
26   with_first_found:
27     - "{{lookup('env','PWD')}}/host_files/{{inventory_hostname}}/{{role_name}}/systemd-unit-status-mail.sh"
28     - "{{lookup('env','PWD')}}/group_files/{{group_files_group}}/{{role_name}}/systemd-unit-status-mail.sh"
29     - "{{lookup('env','PWD')}}/group_files/all/{{role_name}}/systemd-unit-status-mail.sh"
30     - "default/systemd-unit-status-mail.sh"
31
32
33 - name: reload systemd
34   systemd:
35     daemon_reload: yes