Browse Source

mask journald

master
Jörg Thalheim 7 years ago
parent
commit
dd0ced3da6
  1. 7
      roles/container/defaults/main.yml
  2. 15
      roles/container/tasks/main.yml

7
roles/container/defaults/main.yml

@ -0,0 +1,7 @@
masked_services:
- systemd-journald-dev-log.socket
- systemd-journald.socket
- systemd-journald.service
- systemd-logind.service
- getty.target
- systemd-journal-flush.service

15
roles/container/tasks/main.yml

@ -4,9 +4,12 @@
pacman: update_cache=yes
- name: install htop
pacman: name=htop state=present
- name: Disable getty
file: src=/dev/null dest=/etc/systemd/system/getty.target state=link
- name: Disable logind
file: src=/dev/null dest=/etc/systemd/system/systemd-logind.service state=link
- name: Disable logind
service: name=systemd-logind state=stopped enabled=no
- name: Mask services
file: src=/dev/null dest=/etc/systemd/system/{{ item }} state=link
with_items: masked_services
- name: Stop services
service: name={{ item }} state=stopped enabled=no
with_items: masked_services
- mount: name=/run/systemd/journal/ src=/mnt/journal fstype=none opts=bind,ro state=present
Loading…
Cancel
Save