This commit is contained in:
2021-11-10 17:47:51 +00:00
commit 452f4bef14
10 changed files with 110 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
[Unit]
Description=nyancat on tty1
After=graphical.target
[Service]
Type=simple
ExecStartPre=/bin/sleep 5
ExecStart=/usr/bin/nyancat -snI
ExecStop=/bin/kill -HUP ${MAINPID}
StandardInput=tty
StandardOutput=tty
TTYPath=/dev/tty1
Restart=always
RestartSec=2
[Install]
WantedBy=graphical.target

View File

@@ -0,0 +1,28 @@
---
- name: Install nyancat
apt:
name: nyancat
state: present
when: ansible_facts['os_family'] == "Debian"
- name: Install nyancat unit
copy:
src: files/nyancat-tty.service
dest: /etc/systemd/system/nyancat-tty.service
- name: Disable tty
systemd:
name: "{{ item }}"
enabled: no
state: stopped
loop:
- getty
- getty@tty1
ignore_errors: True
- name: Install nyancat unit
systemd:
name: nyancat-tty
enabled: yes
state: started
daemon_reload: yes