vm/guest: Remove rngd (obsoleted by khwrngd)
[noc.git] / ansible / roles / vm / guest / tasks / rngd.yml
1 - name: Install rngd
2   apt:
3     name: rng-tools
4     state: present
5     force_apt_get: yes
6
7 - name: Configure rngd [1/2]
8   lineinfile:
9     path: /etc/default/rng-tools
10     line: '{{ item.key }}={{ item.value }}'
11     regexp: '^#?{{ item.key }}='
12   with_dict: '{{ rngd_config }}'
13   loop_control:
14     label: "{{ item.key }}"
15   notify: restart rngd
16
17 - name: Configure rngd [2/2]
18   lineinfile:
19     path: /etc/default/rng-tools
20     regexp: '^{{ item.key }}=(?!{{ item.value }})'
21     state: absent
22   with_dict: '{{ rngd_config }}'
23   loop_control:
24     label: "{{ item.key }}"
25   notify: restart rngd