I’m playing around with the Ansible collection maas.maas
and am running up against an issue that I’m not understanding when attempting to create a network interface link via a playbook.
I have a machine in MaaS, and I’m trying to add a static IP assignment to it using the following info:
- name: Create Interface
maas.maas.network_interface_physical:
cluster_instance:
host: "{{ maas_api_host }}"
token_key: "{{ maas_api_token_key }}"
token_secret: "{{ maas_api_token_secret }}"
customer_key: "{{ maas_api_customer_key }}"
machine: "{{ maas_machine_name }}.{{ maas_machine_domain }}"
state: present
mac_address: "{{ machine_mac_address }}"
vlan: 1
name: "mgmt0"
- name: Assign IP Address
maas.maas.network_interface_link:
cluster_instance:
host: "{{ maas_api_host }}"
token_key: "{{ maas_api_token_key }}"
token_secret: "{{ maas_api_token_secret }}"
customer_key: "{{ maas_api_customer_key }}"
machine: "some-machine.maas"
state: present
mode: STATIC
network_interface: "mgmt0"
subnet: 10.0.0.0/16
ip_address: 10.0.121.1
default_gateway: True
I keep hitting the following error:
TASK [Create Interface] ************************************************************
ok: [localhost]
TASK [IP Address] ******************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "subnet - 10.0.0.0/16 does not have the same fabric. Try another subnet or change fabric."}
I don’t fully understand what that error message is trying to tell me so I’m reaching out to the community here.
Thanks!