fix tmp.mount for centos 8

This commit is contained in:
Josh Lay 2020-01-01 21:58:44 -06:00
parent 0f2b73b30b
commit 6abb30169f
2 changed files with 25 additions and 0 deletions

View file

@ -0,0 +1,3 @@
# Make 'systemctl enable tmp.mount' work:
[Install]
WantedBy=local-fs.target

View 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"])