I need to assign multiple IPs to the same host using Ansible nios modules. I tried using nios_host_record module but it doesn't work in this scenario.
- name: configure an ipv4 host record
nios_host_record:
name: host.ansible.com
ipv4:
- address: 192.168.10.1
aliases:
- cname.ansible.com
state: present
provider:
host: "{{ inventory_hostname_short }}"
username: admin
password: admin
connection: local"
You can add multiple IPs like a list. Wish Ansible documentation for modules should have more examples like this.