Housekeeping;Add tty console message
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2022-07-22 09:38:03 +02:00
parent 05e0c50217
commit 96dccef450
8 changed files with 78 additions and 20 deletions

View File

@ -2,19 +2,7 @@
ansible.builtin.cron:
name: firstboot
state: absent
- name: Restore extra tty
ansible.builtin.lineinfile:
path: /etc/systemd/logind.conf
regexp: "{{ item.regexp }}"
line: "{{ item.line }}"
loop:
- { regexp: '^NAutoVTs=', line: '#NAutoVTs=6'}
- { regexp: '^ReserveVT=', line: '#ReserveVT=6'}
- name: Unmask getty@tty1 service
ansible.builtin.systemd:
name: getty@tty1
enabled: yes
masked: no
- name: Reboot host
ansible.builtin.shell:
cmd: /usr/sbin/reboot now

View File

@ -93,6 +93,7 @@
# TODO: Make this list dynamic
- git
- gitops
- ingress
- registry
- storage
@ -133,11 +134,6 @@
chdir: /opt/metacluster/container-images/
loop: "{{ imagetarballs.files }}"
- name: Delete container image tarballs/archives
ansible.builtin.file:
path: /opt/metacluster/container-images
state: absent
- name: Configure K3s node for private registry
ansible.builtin.template:
dest: /etc/rancher/k3s/registries.yaml
@ -334,6 +330,12 @@
status_code: [200, 201]
body_format: json
- name: Delete container image tarballs/archives
ansible.builtin.file:
path: "{{ item }}"
state: absent
with_fileglob: /opt/metacluster/container-images/*.tar
- name: Cleanup tempfile
ansible.builtin.file:
path: "{{ kubeconfig.path }}"

View File

@ -0,0 +1,20 @@
- name: Create folder structure(s)
ansible.builtin.file:
path: "{{ item }}"
state: directory
loop:
- /opt/firstboot
- name: Save tty script file
ansible.builtin.template:
src: tty.j2
dest: /opt/firstboot/tty.sh
user: root
group: root
mode: 0700
- name: Create @reboot crontab job
ansible.builtin.cron:
name: tty.consolemessage
special_time: reboot
job: /opt/firstboot/tty.sh