Refactor samba-install.yml: clean up whitespace, update notify actions, and standardize tag formatting
This commit is contained in:
@@ -198,7 +198,6 @@
|
|||||||
- samba-server
|
- samba-server
|
||||||
- samba-virusfilter
|
- samba-virusfilter
|
||||||
|
|
||||||
|
|
||||||
- name: (samba-config-server.yml) Configure AppArmor local profile for clamd (data paths)
|
- name: (samba-config-server.yml) Configure AppArmor local profile for clamd (data paths)
|
||||||
template:
|
template:
|
||||||
src: etc/apparmor.d/local/usr.sbin.clamd.j2
|
src: etc/apparmor.d/local/usr.sbin.clamd.j2
|
||||||
@@ -206,7 +205,9 @@
|
|||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
notify: Reload AppArmor profile clamd
|
notify:
|
||||||
|
- Reload AppArmor profile clamd
|
||||||
|
- Restart clamav-daemon
|
||||||
when:
|
when:
|
||||||
- inventory_hostname in groups['samba_server']
|
- inventory_hostname in groups['samba_server']
|
||||||
- samba_shares | selectattr('vfs_object_virusfilter', 'defined') |
|
- samba_shares | selectattr('vfs_object_virusfilter', 'defined') |
|
||||||
@@ -214,7 +215,7 @@
|
|||||||
tags:
|
tags:
|
||||||
- samba-server
|
- samba-server
|
||||||
- samba-virusfilter
|
- samba-virusfilter
|
||||||
|
|
||||||
- name: (samba-config-server.yml) Ensure AllowAllMatchScan is enabled in clamd.conf
|
- name: (samba-config-server.yml) Ensure AllowAllMatchScan is enabled in clamd.conf
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /etc/clamav/clamd.conf
|
path: /etc/clamav/clamd.conf
|
||||||
@@ -316,7 +317,7 @@
|
|||||||
register: clean_samba_trash_dirs
|
register: clean_samba_trash_dirs
|
||||||
when:
|
when:
|
||||||
- inventory_hostname in groups['samba_server']
|
- inventory_hostname in groups['samba_server']
|
||||||
tags: [ samba-server, samba-cron ]
|
tags: [samba-server, samba-cron]
|
||||||
|
|
||||||
- name: (samba-config-server.yml) Creates a cron job for cleaning up samba trash dirs
|
- name: (samba-config-server.yml) Creates a cron job for cleaning up samba trash dirs
|
||||||
ansible.builtin.cron:
|
ansible.builtin.cron:
|
||||||
@@ -332,7 +333,7 @@
|
|||||||
- inventory_hostname in groups['samba_server']
|
- inventory_hostname in groups['samba_server']
|
||||||
- clean_samba_trash_exists.stat.exists | bool
|
- clean_samba_trash_exists.stat.exists | bool
|
||||||
- (clean_samba_trash_dirs.found | int) > 0
|
- (clean_samba_trash_dirs.found | int) > 0
|
||||||
tags: [ samba-server, samba-cron ]
|
tags: [samba-server, samba-cron]
|
||||||
|
|
||||||
# ---
|
# ---
|
||||||
# Cronjob for setting permissions on samba shares
|
# Cronjob for setting permissions on samba shares
|
||||||
@@ -344,7 +345,7 @@
|
|||||||
register: set_permissions_on_samba_shares_exists
|
register: set_permissions_on_samba_shares_exists
|
||||||
when:
|
when:
|
||||||
- inventory_hostname in groups['samba_server']
|
- inventory_hostname in groups['samba_server']
|
||||||
tags: [ samba-server, samba-cron ]
|
tags: [samba-server, samba-cron]
|
||||||
|
|
||||||
- name: (samba-config-server.yml) Adjust configuration for script 'set_permissions_samba_shares.sh'
|
- name: (samba-config-server.yml) Adjust configuration for script 'set_permissions_samba_shares.sh'
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
@@ -353,7 +354,7 @@
|
|||||||
when:
|
when:
|
||||||
- inventory_hostname in groups['samba_server']
|
- inventory_hostname in groups['samba_server']
|
||||||
- set_permissions_on_samba_shares_exists.stat.exists | bool
|
- set_permissions_on_samba_shares_exists.stat.exists | bool
|
||||||
tags: [ samba-server, samba-cron ]
|
tags: [samba-server, samba-cron]
|
||||||
|
|
||||||
- name: (samba-config-server.yml) Creates a cron job for setting permissions to samba dirs
|
- name: (samba-config-server.yml) Creates a cron job for setting permissions to samba dirs
|
||||||
ansible.builtin.cron:
|
ansible.builtin.cron:
|
||||||
@@ -368,7 +369,7 @@
|
|||||||
when:
|
when:
|
||||||
- inventory_hostname in groups['samba_server']
|
- inventory_hostname in groups['samba_server']
|
||||||
- (clean_samba_trash_dirs.found | int) > 0 # << int -> bool
|
- (clean_samba_trash_dirs.found | int) > 0 # << int -> bool
|
||||||
tags: [ samba-server, samba-cron ]
|
tags: [samba-server, samba-cron]
|
||||||
|
|
||||||
# ---
|
# ---
|
||||||
# Samba clients
|
# Samba clients
|
||||||
|
|||||||
Reference in New Issue
Block a user