From 61401c36051f7b097f80a22de6d6d84cc78b69ad Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Tue, 17 Dec 2024 02:21:03 +0100 Subject: add samba role --- roles/samba/handlers/main.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 roles/samba/handlers/main.yml (limited to 'roles/samba/handlers/main.yml') diff --git a/roles/samba/handlers/main.yml b/roles/samba/handlers/main.yml new file mode 100644 index 0000000..81dfe5e --- /dev/null +++ b/roles/samba/handlers/main.yml @@ -0,0 +1,12 @@ +- name: Collect service facts + ansible.builtin.service_facts: + listen: samba_configured + +- name: Restart Samba service + become: true + when: | + 'smbd.service' in ansible_facts.services and ansible_facts.services['smbd.service'].state == 'running' + ansible.builtin.systemd_service: + name: smbd + state: restarted + listen: samba_configured -- cgit v1.2.3