Sorry, last error message is slightly innaccurate.... I was testing a change in that one (difference is brackets [ ]):
TASK [dns_update : include_tasks] ******************************************************************************************************************************************************************************************************** fatal: [ansible-ub18]: FAILED! => {"reason": "Syntax Error while loading YAML.\n found unknown escape character\n\nThe error appears to have been in '/etc/ansible/role/dns_update/tasks/Ubuntu18.yml': line 7, column 15, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n regexp: \".*nameservers.*$\\n.*addresses:(.*$)\"\n replace: \"\\1 {{ dns1 }}, {{ dns 2}}\"\n ^ here\nWe could be wrong, but this one looks like it might be an issue with\nmissing quotes. Always quote template expression brackets when they\nstart a value. For instance:\n\n with_items:\n - {{ foo }}\n\nShould be written as:\n\n with_items:\n - \"{{ foo }}\"\n"} -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/85332d11-9309-4182-8d94-c47a1c1cc6a9%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.