I’m running ansible-core 2.12.3, on python 3.10, with 2 collections installed:
Collection Version
ansible.posix 1.3.0
community.general 4.5.0
I’m trying to use the nmcli module to set the DNS servers for a connection, and it’s failing thus:
ansible HOST -m nmcli -a “conn_name=em1 type=ethernet state=present dns6=‘::1 2620:fe::fe’”
HOST | FAILED! => {
“ansible_facts”: {
“discovered_interpreter_python”: “/usr/bin/python”
},
“changed”: false,
“msg”: “Error: Failed to modify connection ‘em1’: ipv4.gateway: gateway cannot be set if there are no addresses configured\n”,
“name”: “em1”,
“rc”: 1
}
I don’t want/need to change the IP address settings, just the DNS. Any idea why nmcli is failing?
Regards,
Anand