mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 11:42:08 +00:00
@georgejhunt please let us know if this renaming is ok (as discussed in http://minutes.iiab.io live chat) I'll do the 2nd file now.
35 lines
1.3 KiB
YAML
35 lines
1.3 KiB
YAML
- name: Does systemd-udevd.service exist
|
|
stat: path="{{ systemd_location }}/systemd-udevd.service"
|
|
register: udev_unit
|
|
|
|
- name: Copy udevd service to /etc/systemd/system to modify
|
|
copy: src={{ systemd_location }}/systemd-udevd.service
|
|
dest=/etc/systemd/system/systemd-udevd.service
|
|
owner=root
|
|
group=root
|
|
mode=0644
|
|
when: udev_unit.stat.exists is defined and udev_unit.stat.exists
|
|
|
|
- name: Change MountFlags from slave to shared
|
|
lineinfile: backup=no
|
|
dest=/etc/systemd/system/systemd-udevd.service
|
|
regexp='^MountFlags'
|
|
line='MountFlags=shared'
|
|
state=present
|
|
when: udev_unit.stat.exists is defined and udev_unit.stat.exists
|
|
|
|
# ubuntu 16.04 comes with ansible 2.0.0.2 -- no systemd module
|
|
- name: Ask systemd to recognize the changes
|
|
shell: systemctl daemon-reload
|
|
when: udev_unit.stat.exists is defined and udev_unit.stat.exists
|
|
|
|
- name: restart so systemd recognizes the changes
|
|
shell: systemctl restart systemd-udevd.service
|
|
when: udev_unit.stat.exists is defined and udev_unit.stat.exists
|
|
|
|
- name: reload systemd-udevd so it has rootfs open read-write
|
|
template: src=udev-reload.service dest=/etc/systemd/system/
|
|
|
|
- name: enable the reload service
|
|
shell: systemctl enable udev-reload.service
|
|
|