working with quotes and comments
diff --git a/tasks/main.yml b/tasks/main.yml index 994466a..83939dc 100644 --- a/tasks/main.yml +++ b/tasks/main.yml
@@ -12,8 +12,8 @@ become: yes replace: dest: /etc/hosts - regexp: '::1.*(localhost6.*)$' - replace: '::1 \1' + regexp: '(^::1.*localhost6.*)$' + replace: '# \1' - block: - name: Start rngd service