From e4c08c0a6a0697a01bd4e2c54f8637c3da6fbb88 Mon Sep 17 00:00:00 2001 From: Wojciech Kozlowski Date: Mon, 15 May 2023 21:51:27 +0200 Subject: [PATCH] Expose download folder to VM --- .../roles/music/rip/tasks/include/samba.yml | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/playbooks/roles/music/rip/tasks/include/samba.yml b/playbooks/roles/music/rip/tasks/include/samba.yml index 21203a9..c382aef 100644 --- a/playbooks/roles/music/rip/tasks/include/samba.yml +++ b/playbooks/roles/music/rip/tasks/include/samba.yml @@ -5,6 +5,23 @@ - "samba" - "samba-client" +- name: "samba : configure \"music-download\" samba share" + ansible.builtin.blockinfile: + path: "/etc/samba/smb.conf" + mode: 0644 + insertafter: "EOF" + marker: "# {mark} ANSIBLE MANAGED BLOCK MUSIC:DOWNLOAD" + block: | + [music-download] + comment = Music drive + path = {{ music_user_home_directory }}/download + browseable = yes + read only = no + guest ok = no + create mask = 0644 + directory mask = 0755 + register: music_rip_samba_download_config + - name: "samba : configure \"music-rip\" samba share" ansible.builtin.blockinfile: path: "/etc/samba/smb.conf" @@ -95,7 +112,8 @@ name: "smbd" state: "restarted" when: - (music_rip_samba_rip_config.changed or + (music_rip_samba_download_config.changed or + music_rip_samba_rip_config.changed or music_rip_samba_dvd_config.changed or music_rip_samba_collection_config.changed or music_rip_samba_archive_config.changed) and