mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 03:32:12 +00:00
put in separate file, execute unconditionally
This commit is contained in:
parent
c021882545
commit
e794e1e9d2
3 changed files with 27 additions and 26 deletions
|
@ -42,3 +42,4 @@
|
|||
- include: net_mods.yml
|
||||
when: not is_debuntu and not is_F18
|
||||
|
||||
- include: udev.yml
|
||||
|
|
|
@ -30,29 +30,3 @@
|
|||
service: name=wpa_supplicant
|
||||
enabled=no
|
||||
|
||||
- name: Does systemd-udevd.service exist
|
||||
stat: "{{ 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
|
||||
|
||||
- name: Ask systemd to recognize the changes
|
||||
systemd: name=systemd-udevd
|
||||
daemon-reload=True
|
||||
state=restarted
|
||||
when: udev_unit.stat.exists is defined and udev_unit stat.exists
|
||||
|
||||
|
|
26
roles/2-common/tasks/udev.yml
Normal file
26
roles/2-common/tasks/udev.yml
Normal file
|
@ -0,0 +1,26 @@
|
|||
- name: Does systemd-udevd.service exist
|
||||
stat: "{{ 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
|
||||
|
||||
- name: Ask systemd to recognize the changes
|
||||
systemd: name=systemd-udevd
|
||||
daemon-reload=True
|
||||
state=restarted
|
||||
when: udev_unit.stat.exists is defined and udev_unit stat.exists
|
||||
|
Loading…
Reference in a new issue