From f1d2879a571e9ce27c2ec05265a5f48d4da69951 Mon Sep 17 00:00:00 2001 From: kev Date: Thu, 7 Apr 2016 01:06:51 +0800 Subject: [PATCH] update playbook --- aria2/playbook.yml | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/aria2/playbook.yml b/aria2/playbook.yml index 20cf3ab..3aac07c 100644 --- a/aria2/playbook.yml +++ b/aria2/playbook.yml @@ -91,19 +91,29 @@ - restart nginx changed_when: yes - - name: update samba config - blockinfile: - dest: /etc/samba/smb.conf - insertafter: EOF - content: | - [share] - path = /home/pi/share - browseable = yes - read only = yes - guest ok = yes - notify: - - restart samba - changed_when: yes + - block: + + - name: update samba config + ini_file: + dest: /etc/samba/smb.conf + section: global + option: guest account + value: pi + notify: + - restart samba + + - name: update samba config again + blockinfile: + dest: /etc/samba/smb.conf + insertafter: EOF + content: | + [share] + path = /home/pi/share + browseable = yes + read only = no + guest ok = yes + notify: + - restart samba handlers: