fix tmp.mount for centos 8
This commit is contained in:
parent
0f2b73b30b
commit
6abb30169f
2 changed files with 25 additions and 0 deletions
3
roles/tmp-mount-fix/tasks/fix-enable.conf
Normal file
3
roles/tmp-mount-fix/tasks/fix-enable.conf
Normal file
|
@ -0,0 +1,3 @@
|
|||
# Make 'systemctl enable tmp.mount' work:
|
||||
[Install]
|
||||
WantedBy=local-fs.target
|
22
roles/tmp-mount-fix/tasks/main.yml
Normal file
22
roles/tmp-mount-fix/tasks/main.yml
Normal file
|
@ -0,0 +1,22 @@
|
|||
---
|
||||
- block:
|
||||
- name: create tmp.mount.d dir
|
||||
file:
|
||||
path: /etc/systemd/system/tmp.mount.d/
|
||||
state: directory
|
||||
mode: '0755'
|
||||
register: tmpmnt_directory_state
|
||||
- name: add drop-in fix
|
||||
copy:
|
||||
dest: "/etc/systemd/system/tmp.mount.d/fix-enable.conf"
|
||||
src: "fix-enable.conf"
|
||||
register: fix_enable_conf
|
||||
- name: reload systemd
|
||||
systemd:
|
||||
daemon_reload: yes
|
||||
when: fix_enable_conf is changed
|
||||
- name: enable tmp.mount
|
||||
service:
|
||||
name: tmp.mount
|
||||
enabled: yes
|
||||
when: (ansible_distribution in ["CentOS"] and ansible_distribution_major_version in ["8"])
|
Loading…
Reference in a new issue