]> git.somenet.org - root/pub/somesible.git/blob - roles/base/systemd/preset/tasks/main.yml
[roles/base/logrotate] install + update logrotate
[root/pub/somesible.git] / roles / base / systemd / preset / 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: make sure /etc/systemd/system-preset/ exists
9   file:
10     path: "/etc/systemd/system-preset/"
11     state: directory
12     mode: 0755
13     owner: "root"
14     group: "root"
15
16
17 - name: copy 99-somesible-defaults.preset
18   copy:
19     src: "{{item}}"
20     dest: "/etc/systemd/system-preset/99-somesible-defaults.preset"
21   with_first_found:
22     - "{{lookup('env','PWD')}}/host_files/{{inventory_hostname}}/{{role_name}}/99-somesible-defaults.preset"
23     - "{{lookup('env','PWD')}}/group_files/{{group_files_group}}/{{role_name}}/99-somesible-defaults.preset"
24     - "{{lookup('env','PWD')}}/group_files/all/{{role_name}}/99-somesible-defaults.preset"
25     - "default/99-somesible-defaults.preset"
26
27
28 - name: reload systemd
29   systemd:
30     daemon_reload: yes