This repository has been archived on 2020-08-09. You can view files and clone it, but cannot push or open issues or pull requests.
ansible-systemd/tasks/main.yml

23 lines
613 B
YAML

- name: Create override directories
loop: "{{ systemd.overrides }}"
file:
follow: yes
path: "/etc/systemd/system/{{ item }}.service.d/"
state: directory
when: (systemd.overrides| default([])) | length
tags:
- systemd
- override
- name: Copy service overrides
loop: "{{ systemd.overrides }}"
template:
follow: yes
src: "{{ item }}.service.j2"
dest: "/etc/systemd/system/{{ item }}.service.d/override.conf"
notify:
- Restart services
when: (systemd.overrides| default([])) | length
tags:
- systemd
- override