aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/roles/linux_status/tasks/main.yml
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2023-09-23 00:46:31 +0200
committerEgor Tensin <Egor.Tensin@gmail.com>2023-09-23 10:15:05 +0200
commitd51005bf38caf3b8c5a3334527b4ab34c8784a55 (patch)
treec2e48f5c6f3b07c178ba9e630e2fe4388792dfa2 /roles/linux_status/tasks/main.yml
parentdocker: avoid duplicate service restarts (diff)
downloadinfra-ansible-d51005bf38caf3b8c5a3334527b4ab34c8784a55.tar.gz
infra-ansible-d51005bf38caf3b8c5a3334527b4ab34c8784a55.zip
linux_status: get rid of unnecessary service restarts, etc.
Diffstat (limited to 'roles/linux_status/tasks/main.yml')
-rw-r--r--roles/linux_status/tasks/main.yml34
1 files changed, 9 insertions, 25 deletions
diff --git a/roles/linux_status/tasks/main.yml b/roles/linux_status/tasks/main.yml
index 951c838..f3344ff 100644
--- a/roles/linux_status/tasks/main.yml
+++ b/roles/linux_status/tasks/main.yml
@@ -1,31 +1,15 @@
-- 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: Configure power management
+ ansible.builtin.include_tasks: power_management.yml
- name: Install linux-status
become: true
- ansible.builtin.apt:
+ ansible.builtin.package:
name: linux-status
state: present
- policy_rc_d: 101
- notify: linux_status_restart
-- name: Restart systemd service if necessary
- ansible.builtin.meta: flush_handlers
+- name: Enable & start linux-status.service
+ become: true
+ ansible.builtin.systemd_service:
+ name: linux-status.service
+ enabled: true
+ state: started