From 87d4fe0eca406e7cadee9230ccd8c47c7d78cb6e Mon Sep 17 00:00:00 2001 From: Bert Van Vreckem Date: Tue, 9 May 2017 14:19:01 +0200 Subject: [PATCH] Fix service names & start services in a single task --- tasks/main.yml | 12 +++--------- vars/os_Archlinux.yml | 5 +++-- vars/os_Debian.yml | 4 ++-- vars/os_RedHat.yml | 5 +++-- 4 files changed, 11 insertions(+), 15 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index dd7a7a6..297a19d 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -77,18 +77,12 @@ - Restart WinBind tags: samba -- name: Start Samba service +- name: Start Samba service(s) service: - name: "{{ samba_service }}" - state: started - enabled: yes - tags: samba - -- name: Start WindBind service - service: - name: "{{ winbind_service }}" + name: "{{ item }}" state: started enabled: yes + with_items: "{{ samba_services }}" tags: samba - name: Create Samba users if they don't exist yet diff --git a/vars/os_Archlinux.yml b/vars/os_Archlinux.yml index edfd3f6..71f28c4 100644 --- a/vars/os_Archlinux.yml +++ b/vars/os_Archlinux.yml @@ -10,7 +10,8 @@ samba_selinux_booleans: [] samba_configuration: /etc/samba/smb.conf -samba_service: smbd -winbind_service: nmbd +samba_services: + - smbd + - nmbd samba_www_documentroot: /var/www diff --git a/vars/os_Debian.yml b/vars/os_Debian.yml index a467b52..c9d0700 100644 --- a/vars/os_Debian.yml +++ b/vars/os_Debian.yml @@ -11,7 +11,7 @@ samba_selinux_booleans: [] samba_configuration: /etc/samba/smb.conf -samba_service: smbd -winbind_service: nmbd +samba_services: + - samba samba_www_documentroot: /var/www diff --git a/vars/os_RedHat.yml b/vars/os_RedHat.yml index 819fa54..b8fbf56 100644 --- a/vars/os_RedHat.yml +++ b/vars/os_RedHat.yml @@ -15,7 +15,8 @@ samba_selinux_booleans: samba_configuration: /etc/samba/smb.conf -samba_service: smb -winbind_service: nmb +samba_services: + - smb + - nmb samba_www_documentroot: /var/www/html