From 09763679131a9c4bfd8d3b891f589b44d42a3657 Mon Sep 17 00:00:00 2001 From: Emil Renner Berthing Date: Fri, 21 Sep 2018 23:43:50 +0200 Subject: Use one variable for chroot or nspawn environment --- roles/space_server/tasks/gettys.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'roles/space_server/tasks/gettys.yml') diff --git a/roles/space_server/tasks/gettys.yml b/roles/space_server/tasks/gettys.yml index bdf293a..ea351f4 100644 --- a/roles/space_server/tasks/gettys.yml +++ b/roles/space_server/tasks/gettys.yml @@ -4,22 +4,22 @@ name: getty@tty1.service enabled: no state: stopped - when: "'container' not in ansible_env" -- name: '- when in nspawn' + when: not chroot +- name: '- when in chroot' command: systemctl disable getty@tty1.service args: removes: '/etc/systemd/system/getty.target.wants/getty@tty1.service' - when: "'container' in ansible_env" + when: chroot - name: Enable serial-getty@ttyS0 systemd: name: serial-getty@ttyS0.service enabled: yes - when: "'container' not in ansible_env" -- name: '- when in nspawn' + when: not chroot +- name: '- when in chroot' command: systemctl enable serial-getty@ttyS0.service args: creates: '/etc/systemd/system/getty.target.wants/serial-getty@ttyS0.service' - when: "'container' in ansible_env" + when: chroot # vim: set ts=2 sw=2 et: -- cgit v1.2.1