X-Git-Url: https://git.realraum.at/?a=blobdiff_plain;f=ansible%2Froles%2Fvm%2Fguest%2Ftasks%2Fmain.yml;h=e328026abb620478f36fc2f444f14e13b9a2202e;hb=2fb00147adff89fa701ef21a4f6d0da696d27488;hp=780a27645869fffb72e300a54b2765a7208c16a5;hpb=73f20ebb5ea2b2626a19f5e8a01ce36d35d64a61;p=noc.git diff --git a/ansible/roles/vm/guest/tasks/main.yml b/ansible/roles/vm/guest/tasks/main.yml index 780a276..e328026 100644 --- a/ansible/roles/vm/guest/tasks/main.yml +++ b/ansible/roles/vm/guest/tasks/main.yml @@ -7,7 +7,7 @@ lineinfile: path: /etc/default/rng-tools line: '{{ item.key }}={{ item.value }}' - regexp: '^#?{{ item.key }}={{ item.value }}' + regexp: '^#?{{ item.key }}=' with_dict: '{{ rngd_config }}' loop_control: label: "{{ item.key }}" @@ -22,3 +22,16 @@ loop_control: label: "{{ item.key }}" notify: restart rngd + +- name: Provide a root shell on the VM console [1/2] + file: + path: /etc/systemd/system/serial-getty@ttyS0.service.d/ + state: directory + +- name: Provide a root shell on the VM console [2/2] + copy: + dest: /etc/systemd/system/serial-getty@ttyS0.service.d/autologon.conf + content: | + [Service] + ExecStart= + ExecStart=-/sbin/agetty --keep-baud 115200,38400,9600 --noclear --autologin root --login-pause --host {{ vm_install_host }} %I $TERM