The documentation states that multiple DNS entries should be formatted like
so:
A list of upto 3 dns servers, ipv4 format e.g. To add two IPv4 DNS server
addresses: ["8.8.8.8 8.8.4.4"]
Following that example, I get the error: "Error: failed to modify ipv4.dns:
invalid IPv4 address '[\"216.xxx.xxx.xxx'.\n"
The documentation provides examples that include:
# To add two IPv4 DNS server addresses:
-nmcli: conn_name=my-eth1 dns4=["8.8.8.8", "8.8.4.4"] state=present
When I follow that example, I end up with an extra params error and template
expressions erro:
ERROR! this task 'nmcli' has extra params, which is only allowed in the
following modules...
Always quote template expression brackets when they start a value...
---
- hosts: redacted
user: redacted
sudo: yes
pre_tasks:
- nmcli: 'conn_name="{{ ansible_interfaces[1] }}"
state=present
type=ethernet
ip4=redacted
gw4=redacted
dns4=["redacted", "8.8.8.8", "redacted"]'
I've tried swapping the quotes around, with singles inside and doubles outside,
and got the same extra params error. I haven't cracked the syntax just right
yet.
I'd love a pointer for what to try next.
--
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/a8fe0c39-779e-4ead-82cd-b6d2347d15f2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.