NICs

This is a simple module that supports listing NICs.

Example Syntax


name: List NICs
ionoscloudsdk.ionoscloud.nic_info:
  datacenter: 'AnsibleAutoTestCompute'
  server: 'AnsibleAutoTestCompute'
register: nic_list_response

Returned object

{
    "changed": false,
    "nics": [
        {
            "entities": {
                "firewallrules": {
                    "links": null,
                    "href": "https://api.ionos.com/cloudapi/v6/datacenters/0487f06f-b02d-4b78-b4e4-f48d86daf293/servers/73362db5-03c9-4445-907c-d539e7a0a160/nics/6e9d998f-9748-421d-8ad6-6e8bae893361/firewallrules",
                    "id": "6e9d998f-9748-421d-8ad6-6e8bae893361/firewallrules",
                    "items": null,
                    "limit": null,
                    "offset": null,
                    "type": "collection"
                },
                "flowlogs": {
                    "links": null,
                    "href": "https://api.ionos.com/cloudapi/v6/datacenters/0487f06f-b02d-4b78-b4e4-f48d86daf293/servers/73362db5-03c9-4445-907c-d539e7a0a160/nics/6e9d998f-9748-421d-8ad6-6e8bae893361/flowlogs",
                    "id": "6e9d998f-9748-421d-8ad6-6e8bae893361/flowlogs",
                    "items": null,
                    "limit": null,
                    "offset": null,
                    "type": "collection"
                }
            },
            "href": "https://api.ionos.com/cloudapi/v6/datacenters/0487f06f-b02d-4b78-b4e4-f48d86daf293/servers/73362db5-03c9-4445-907c-d539e7a0a160/nics/6e9d998f-9748-421d-8ad6-6e8bae893361",
            "id": "6e9d998f-9748-421d-8ad6-6e8bae893361",
            "metadata": {
                "created_by": "<USER_EMAIL>",
                "created_by_user_id": "<USER_ID>",
                "created_date": "2023-08-03T11:35:50+00:00",
                "etag": "7457e8713b1d864cbe352efbef5560fd",
                "last_modified_by": "<USER_EMAIL>",
                "last_modified_by_user_id": "<USER_ID>",
                "last_modified_date": "2023-08-03T11:35:50+00:00",
                "state": "AVAILABLE"
            },
            "properties": {
                "device_number": null,
                "dhcp": true,
                "firewall_active": true,
                "firewall_type": "INGRESS",
                "ips": [
                    "<IP>"
                ],
                "lan": 1,
                "mac": "<MAC>",
                "name": "AnsibleAutoTestCompute",
                "pci_slot": 6
            },
            "type": "nic"
        }
    ],
    "failed": false
}

For more examples please check out the tests here.

Available parameters:

Name
Required
Description

datacenter str

True

The ID or name of the datacenter.

server str

True

The ID or name of the Server.

depth int

False

The depth used when retrieving the items. Default: 1

filters dict

False

Filter that can be used to list only objects which have a certain set of propeties. Filters should be a dict with a key containing keys and value pair in the following format: 'properties.name': 'server_name'

api_url str

False

The Ionos API base URL.

certificate_fingerprint str

False

The Ionos API certificate fingerprint.

username str

False

The Ionos username. Overrides the IONOS_USERNAME environment variable.

password str

False

The Ionos password. Overrides the IONOS_PASSWORD environment variable.

token str

False

The Ionos token. Overrides the IONOS_TOKEN environment variable.

Last updated