aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/roles/linux_status/tasks/main.yml
blob: 17a00d3f5c1001416b772705e4e0bad4a6dbcdfe (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
31
32
33
34
35
36
37
38
39
- name: Set up repository
  ansible.builtin.include_role:
    name: ppa
  vars:
    ppa_owner: egor-tensin
    ppa_name: linux-status
    ppa_key: ecb69cbafc6d7cd8bd67ec35b1089b3051c9384d

- name: Disable power management
  when: linux_status_disable_power_management
  become: true
  block:
    - name: Create override directory
      ansible.builtin.file:
        path: /etc/systemd/system/linux-status.service.d
        state: directory
        owner: root
        group: root
        mode: '755'

    - name: Create override file
      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'
      notify: linux_status_restart

- name: Install linux-status
  become: true
  ansible.builtin.apt:
    install_recommends: false
    name: linux-status
    policy_rc_d: 101
  notify: linux_status_restart

- name: Restart systemd service if necessary
  ansible.builtin.meta: flush_handlers