ansible/roles/baseconfig/tasks/molly-guard.yml
Hadrien Patte b55a2ee047
Fix: add a retry statement to remote package tasks
Signed-off-by: Hadrien Patte <hadrien.patte@protonmail.com>
2019-03-03 19:55:51 +01:00

18 lines
417 B
YAML

---
# Install molly-guard
- name: Install molly-guard
when: ansible_os_family == "Debian"
apt:
name: molly-guard
state: present
update_cache: true
register: apt_result
retries: 3
until: apt_result is succeeded
# Always ask for hostname
- name: Configure molly-guard
lineinfile:
dest: /etc/molly-guard/rc
regexp: '^#*\s*ALWAYS_QUERY_HOSTNAME.*$'
line: 'ALWAYS_QUERY_HOSTNAME=true'