Refactor tasks for compose.yml and add tasks for pihole, homeassistant, and prometheus

Signed-off-by: TuDatTr <tuan-dat.tran@tudattr.dev>
This commit is contained in:
TuDatTr
2022-12-29 22:45:17 +01:00
parent ac6080bc2f
commit 350b3ec149
21 changed files with 416 additions and 148 deletions

View File

@@ -4,9 +4,11 @@
src: "{{ smb_config }}"
dest: /etc/samba/smb.conf
become: true
register: smbconf
- name: Restart nmbd.service
systemd:
name: nmbd
state: restarted
become: true
when: smbconf.changed

View File

@@ -32,10 +32,12 @@
groups: "{{ smb_group }}"
append: true
become: true
register: new_user
- name: Add password to "{{ smb_user }}"
shell:
cmd: smbpasswd -a "{{ smb_user }}"
stdin: "{{ vault_smb_user_password }}\n{{ vault_smb_user_password }}"
become: true
when: new_user.changed