Restart systemd *-fs.target.
This commit is contained in:
parent
c95518aa1a
commit
00d2ccada2
|
@ -37,6 +37,7 @@ This role will :
|
|||
* Create the mountpoint directory.
|
||||
* Add an entry in `/etc/fstab`.
|
||||
* Ensure to mount the device if specified.
|
||||
* Restart systemd's filesystem.target to ensure automount device works.
|
||||
|
||||
## Development
|
||||
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
# handlers file for mounts
|
||||
|
||||
- name: restart fs.target
|
||||
systemd:
|
||||
name: "{{ item }}"
|
||||
state: restarted
|
||||
daemon_reload: yes
|
||||
with_items:
|
||||
- local-fs.target
|
||||
- remote-fs.target
|
|
@ -15,3 +15,4 @@
|
|||
opts: "{{ item.opts | default(mounts_opts) }}"
|
||||
state: "{{ item.state | default(mounts_state) }}"
|
||||
with_items: "{{ mounts_list }}"
|
||||
notify: restart fs.target
|
||||
|
|
Reference in New Issue