ansible-edda/playbooks/roles/services/include/tasks/daemon_reload/main.yml

17 lines
583 B
YAML

---
- name: "daemon_reload : {{ services_service_name }} : set variables"
ansible.builtin.import_tasks: "../vars.yml"
- name: "daemon_reload : {{ services_service_name }} : check if home exists"
ansible.builtin.stat:
path: "{{ services_service_user_home }}"
register: services_include_daemon_reload_user_home
- name: "daemon_reload : {{ services_service_name }} : systemd daemon reload"
become_user: "{{ services_service_user_name }}"
ansible.builtin.systemd:
daemon_reload: true
scope: "user"
when:
services_include_daemon_reload_user_home.stat.exists