mirror of
https://github.com/iiab/iiab.git
synced 2025-02-12 19:22:24 +00:00
mountpoint fix for udev
This commit is contained in:
parent
583439b278
commit
effdd484f3
9 changed files with 18 additions and 19 deletions
|
@ -80,27 +80,17 @@
|
|||
- include: detected_network.yml
|
||||
when: not installing
|
||||
|
||||
# Patch Fedora 21+ so usbmount works
|
||||
# Set flag to True that was initialized to False in role defaults
|
||||
# We can't undo this
|
||||
- name: Does udev need patching
|
||||
set_fact:
|
||||
udev_needs_patch: True
|
||||
when: ansible_distribution == "Fedora" and ansible_distribution_version >= "21"
|
||||
|
||||
# Same patch for CentOS 7.2
|
||||
- name: Does udev need patching for Centos
|
||||
set_fact:
|
||||
udev_needs_patch: True
|
||||
when: ansible_distribution == "CentOS" and ansible_distribution_version >= "7.2.1511"
|
||||
- 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=/usr/lib/systemd/system/systemd-udevd.service
|
||||
copy: src={{ systemd_location }}/systemd-udevd.service
|
||||
dest=/etc/systemd/system/systemd-udevd.service
|
||||
owner=root
|
||||
group=root
|
||||
mode=0644
|
||||
when: udev_needs_patch
|
||||
when: udev_unit.stat.exists is defined and udev_unit stat.exists
|
||||
|
||||
- name: Change MountFlags from slave to shared
|
||||
lineinfile: backup=no
|
||||
|
@ -108,12 +98,13 @@
|
|||
regexp='^MountFlags'
|
||||
line='MountFlags=shared'
|
||||
state=present
|
||||
when: udev_needs_patch
|
||||
when: udev_unit.stat.exists is defined and udev_unit stat.exists
|
||||
|
||||
- name: Restart systemd-udevd.service
|
||||
service: name=systemd-udevd
|
||||
- name: Ask systemd to recognize the changes
|
||||
systemd: name=systemd-udevd
|
||||
daemon-reload=True
|
||||
state=restarted
|
||||
when: udev_needs_patch and not installing
|
||||
when: udev_unit.stat.exists is defined and udev_unit stat.exists
|
||||
|
||||
|
||||
# Put conditional actions for hardware platforms here
|
||||
|
|
|
@ -16,3 +16,4 @@ apache_log: /var/log/httpd/access_log
|
|||
sshd_service: sshd
|
||||
php_version: 7.0
|
||||
postgresql_version: 9.5
|
||||
systemd_location: /usr/lib/systemd/system
|
||||
|
|
|
@ -20,3 +20,4 @@ cups_install: True
|
|||
sshd_service: ssh
|
||||
php_version: 5
|
||||
postgresql_version: 9.4
|
||||
systemd_location: /lib/systemd/system
|
||||
|
|
|
@ -20,5 +20,6 @@ cups_install: True
|
|||
sshd_service: ssh
|
||||
php_version: 7.0
|
||||
postgresql_version: 9.6
|
||||
systemd_location: /lib/systemd/system
|
||||
|
||||
|
||||
|
|
|
@ -17,3 +17,4 @@ php_version: 5
|
|||
sshd_service: sshd
|
||||
nextcloud_install: False
|
||||
nextcloud_enabled: False
|
||||
systemd_location: /usr/lib/systemd/system
|
||||
|
|
|
@ -13,3 +13,4 @@ systemctl_program: /usr/bin/systemctl
|
|||
mysql_service: mariadb
|
||||
apache_log: /var/log/httpd/access_log
|
||||
sshd_service: sshd
|
||||
systemd_location: /usr/lib/systemd/system
|
||||
|
|
|
@ -22,3 +22,4 @@ cups_install: True
|
|||
sshd_service: ssh
|
||||
php_version: 5
|
||||
postgresql_version: 9.4
|
||||
systemd_location: /lib/systemd/system
|
||||
|
|
|
@ -22,3 +22,4 @@ cups_install: False
|
|||
sshd_service: ssh
|
||||
php_version: 7.0
|
||||
postgresql_version: 9.6
|
||||
systemd_location: /lib/systemd/system
|
||||
|
|
|
@ -19,3 +19,4 @@ cups_install: True
|
|||
sshd_service: ssh
|
||||
php_version: 7.0
|
||||
postgresql_version: 9.5
|
||||
systemd_location: /lib/systemd/system
|
||||
|
|
Loading…
Reference in a new issue