diff options
author | Egor Tensin <egor@tensin.name> | 2024-12-17 02:21:03 +0100 |
---|---|---|
committer | Egor Tensin <egor@tensin.name> | 2024-12-17 04:19:53 +0100 |
commit | 61401c36051f7b097f80a22de6d6d84cc78b69ad (patch) | |
tree | f8996b155fcd6a614bb6586f5e4a42e61ec45d12 /roles/samba/handlers/main.yml | |
parent | v4.0.2 (diff) | |
download | infra-ansible-61401c36051f7b097f80a22de6d6d84cc78b69ad.tar.gz infra-ansible-61401c36051f7b097f80a22de6d6d84cc78b69ad.zip |
add samba role
Diffstat (limited to '')
-rw-r--r-- | roles/samba/handlers/main.yml | 12 |
1 files changed, 12 insertions, 0 deletions
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 |