Start service before installing config.

This fixes a catch-22 on Fedora. The lock file directory doesn’t exist before starting the service
for a first time.
This commit is contained in:
Bert Van Vreckem 2016-05-12 11:36:16 +02:00
parent 42c7d025e1
commit d5da66cb52

View File

@ -49,7 +49,7 @@
setype: "{{ item.setype|default('samba_share_t') }}" setype: "{{ item.setype|default('samba_share_t') }}"
tags: samba tags: samba
- name: Ensute webserver document root exists - name: Ensure webserver document root exists
file: file:
name: "{{ samba_www_documentroot }}" name: "{{ samba_www_documentroot }}"
state: directory state: directory
@ -63,16 +63,6 @@
with_items: "{{ samba_shares }}" with_items: "{{ samba_shares }}"
tags: samba tags: samba
- name: Samba configuration
template:
dest: "{{ samba_configuration }}"
src: smb.conf.j2
validate: 'testparm -s %s'
notify:
- Restart Samba
- Restart WinBind
tags: samba
- name: Start Samba service - name: Start Samba service
service: service:
name: "{{ samba_service }}" name: "{{ samba_service }}"
@ -87,6 +77,16 @@
enabled: yes enabled: yes
tags: samba tags: samba
- name: Samba configuration
template:
dest: "{{ samba_configuration }}"
src: smb.conf.j2
validate: 'testparm -s %s'
notify:
- Restart Samba
- Restart WinBind
tags: samba
- name: Create Samba users if they don't exist yet - name: Create Samba users if they don't exist yet
shell: > shell: >
(pdbedit -L | grep {{ item.name }} 2>&1 > /dev/null) \ (pdbedit -L | grep {{ item.name }} 2>&1 > /dev/null) \