aboutsummaryrefslogblamecommitdiffstatshomepage
path: root/roles/linux_status/tasks/main.yml
blob: b9884fe7d80b96636a3652651e3a56d0f2405428 (plain) (tree)




















                                                                                         


                            
                      

                             

                              
 

                                            
- 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:
    name: linux-status
    state: present
    install_recommends: false
    policy_rc_d: 101
  notify: linux_status_restart

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