vm/guest: Make sure haveged is not installed
[noc.git] / ansible / roles / vm / guest / tasks / main.yml
1 - name: Install and configure rngd (on kernel < 3.17)
2   when: ansible_kernel is version('3.17', '<')
3   import_tasks: rngd.yml
4
5 - name: Uninstall rngd (on kernel >= 3.17)
6   when: ansible_kernel is version('3.17', '>=')
7   apt:
8     name: rng-tools
9     state: absent
10     purge: yes
11
12 - name: Uninstall haveged
13   when: not (vm_guest_force_haveged | default(False))
14   apt:
15     name: haveged
16     state: absent
17     purge: yes
18
19 - name: Provide a root shell on the VM console [1/2]
20   file:
21     path: /etc/systemd/system/serial-getty@ttyS0.service.d/
22     state: directory
23
24 - name: Provide a root shell on the VM console [2/2]
25   copy:
26     dest: /etc/systemd/system/serial-getty@ttyS0.service.d/autologon.conf
27     content: |
28       [Service]
29       ExecStart=
30       ExecStart=-/sbin/agetty --keep-baud 115200,38400,9600 --noclear --autologin root --login-pause --host {{ vm_install_host }} %I $TERM