networktocode / networktocode.nautobot / 4.5.0 / module / relationship_association Creates or removes a relationship association from Nautobot | "added in version" 4.0.0 of networktocode.nautobot" Authors: Network to Code (@networktocode), Joe Wesch (@joewesch)networktocode.nautobot.relationship_association (4.5.0) — module
Install with ansible-galaxy collection install networktocode.nautobot:==4.5.0
collections: - name: networktocode.nautobot version: 4.5.0
Creates or removes a relationship association from Nautobot
- name: "Test relationship association creation/deletion" connection: local hosts: localhost gather_facts: False tasks: - name: Create relationship association networktocode.nautobot.relationship_association: url: http://nautobot.local token: thisIsMyToken relationship: 01234567-abcd-0123-abcd-012345678901 source_type: dcim.device source_id: abcdefgh-0123-abcd-0123-abcdefghijkl destination_type: ipam.vrf destination_id: 01234567-abcd-0123-abcd-123456789012 - name: Delete relationship association networktocode.nautobot.relationship_association: url: http://nautobot.local token: thisIsMyToken relationship: 01234567-abcd-0123-abcd-012345678901 source_type: dcim.device source_id: abcdefgh-0123-abcd-0123-abcdefghijkl destination_type: ipam.vrf destination_id: 01234567-abcd-0123-abcd-123456789012 state: absent
url: description: - 'The URL of the Nautobot instance resolvable by the Ansible host (for example: http://nautobot.example.com:8000)' required: true type: str state: choices: - absent - present default: present description: - Use C(present) or C(absent) for adding or removing. type: str token: description: - The token created within Nautobot to authorize API access required: true type: str source_id: description: - The UUID of the source of the relationship required: true type: str api_version: description: - API Version Nautobot REST API required: false type: str version_added: 4.1.0 version_added_collection: networktocode.nautobot source_type: description: - The app_label.model for the source of the relationship required: true type: str query_params: description: - This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined - in plugins/module_utils/utils.py and provides control to users on what may make - an object unique in their environment. elements: str required: false type: list version_added: 3.0.0 version_added_collection: networktocode.nautobot relationship: description: - The Relationship UUID to add the association to required: true type: raw destination_id: description: - The UUID of the destination of the relationship required: true type: str validate_certs: default: true description: - If C(no), SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. required: false type: raw destination_type: description: - The app_label.model for the destination of the relationship required: true type: str
msg: description: Message indicating failure or info about what has been achieved returned: always type: str relationship_associations: description: Serialized object as created/existent/updated/deleted within Nautobot returned: always type: dict