diff options
author | Emil Renner Berthing <esmil@labitat.dk> | 2017-11-07 16:27:49 +0100 |
---|---|---|
committer | Emil Renner Berthing <esmil@labitat.dk> | 2017-11-12 14:56:32 +0100 |
commit | e8cdba85c48dcbbd42e6fcb5be3aa2912008cb84 (patch) | |
tree | 41ba5163cf6f110521f2ebc9035f77d2754796a0 /roles/space_server/tasks/gettys.yml | |
download | labitat-ansible-e8cdba85c48dcbbd42e6fcb5be3aa2912008cb84.tar.gz labitat-ansible-e8cdba85c48dcbbd42e6fcb5be3aa2912008cb84.tar.xz labitat-ansible-e8cdba85c48dcbbd42e6fcb5be3aa2912008cb84.zip |
initial commit
Diffstat (limited to 'roles/space_server/tasks/gettys.yml')
-rw-r--r-- | roles/space_server/tasks/gettys.yml | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/roles/space_server/tasks/gettys.yml b/roles/space_server/tasks/gettys.yml new file mode 100644 index 0000000..bdf293a --- /dev/null +++ b/roles/space_server/tasks/gettys.yml @@ -0,0 +1,25 @@ +--- +- name: Disable getty@tty1 + systemd: + name: getty@tty1.service + enabled: no + state: stopped + when: "'container' not in ansible_env" +- name: '- when in nspawn' + command: systemctl disable getty@tty1.service + args: + removes: '/etc/systemd/system/getty.target.wants/getty@tty1.service' + when: "'container' in ansible_env" + +- name: Enable serial-getty@ttyS0 + systemd: + name: serial-getty@ttyS0.service + enabled: yes + when: "'container' not in ansible_env" +- name: '- when in nspawn' + command: systemctl enable serial-getty@ttyS0.service + args: + creates: '/etc/systemd/system/getty.target.wants/serial-getty@ttyS0.service' + when: "'container' in ansible_env" + +# vim: set ts=2 sw=2 et: |