mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Samba role standardized/modularized, for runrole etc
This commit is contained in:
parent
0715af5d18
commit
0484ea38f1
4 changed files with 83 additions and 65 deletions
19
roles/samba/tasks/enable-or-disable.yml
Normal file
19
roles/samba/tasks/enable-or-disable.yml
Normal file
|
@ -0,0 +1,19 @@
|
|||
- name: Enable & Start Samba service ({{ smb_service }}) and NetBIOS name service ({{ nmb_service }}) if samba_enabled
|
||||
systemd:
|
||||
name: "{{ item }}"
|
||||
state: started
|
||||
enabled: yes
|
||||
when: samba_enabled | bool
|
||||
with_items:
|
||||
- "{{ smb_service }}"
|
||||
- "{{ nmb_service }}"
|
||||
|
||||
- name: Disable & Stop Samba service ({{ smb_service }}) and NetBIOS name service ({{ nmb_service }}) if not samba_enabled
|
||||
systemd:
|
||||
name: "{{ item }}"
|
||||
state: stopped
|
||||
enabled: no
|
||||
when: not samba_enabled
|
||||
with_items:
|
||||
- "{{ smb_service }}"
|
||||
- "{{ nmb_service }}"
|
Loading…
Add table
Add a link
Reference in a new issue