blob: 2288d2480e0db58ed41edc402d3f7a2fe5eb2e9a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
- name: Create override directory
become: true
ansible.builtin.file:
path: /etc/systemd/system/linux-status.service.d
state: directory
owner: root
group: root
mode: '755'
- name: Enable power management
become: true
ansible.builtin.file:
path: /etc/systemd/system/linux-status.service.d/99-disable_power_management.conf
state: absent
when: linux_status_enable_power_management
notify: linux_status_configured
- name: Disable power management
become: true
ansible.builtin.template:
src: disable_power_management.conf.j2
dest: /etc/systemd/system/linux-status.service.d/99-disable_power_management.conf
owner: root
group: root
mode: '644'
when: not linux_status_enable_power_management
notify: linux_status_configured
- name: Restart systemd service if necessary
ansible.builtin.meta: flush_handlers
|