Arch-based systems will never automatically enable a systemd service unit for the administrator. Check if 'sysstat.service' exists. Start and enable it if so.
11 lines
321 B
YAML
11 lines
321 B
YAML
# SPDX-License-Identifier: MIT
|
|
- name: 'Gather service facts'
|
|
ansible.builtin.service_facts:
|
|
|
|
- name: 'If ''sysstat.service'' exists make sure it''s running'
|
|
when: '''sysstat.service'' in ansible_facts[''services'']'
|
|
ansible.builtin.service:
|
|
name: 'sysstat.service'
|
|
state: 'started'
|
|
enabled: true
|