This error appears to be related to the other issue I was having, since the
error spits out the same odd jibberish. I suspect line 505 of the code is
related, meaning the dictionary is not reading/parsing cleanly:
dstr+="%s: %s\n" % ( key, str_val)
Anyway, for the DNS entries, it seemed to be happy with dns4="8.8.8.8,
216.125.253.131, 8.8.4.4" which is a hybrid of the two examples in the
documentation.
However, I have lost my connection to the machine until I am on campus
tomorrow or Wednesday, so I am going to be working on something else for
now.
On Monday, November 23, 2015 at 9:35:25 PM UTC-6, Joanna Delaporte wrote:
>
>
> 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/6ffaa596-5156-4eb7-b0c3-997234078819%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.