fragmentedpacket / fragmentedpacket.netbox_modules / 0.1.4 / module / netbox_tenant_group Creates or removes tenant groups from Netbox | "added in version" 0.1.0 of fragmentedpacket.netbox_modules" Authors: Mikhail Yohman (@FragmentedPacket) preview | supported by communityfragmentedpacket.netbox_modules.netbox_tenant_group (0.1.4) — module
Install with ansible-galaxy collection install fragmentedpacket.netbox_modules:==0.1.4
collections: - name: fragmentedpacket.netbox_modules version: 0.1.4
Creates or removes tenant groups from Netbox
- name: "Test Netbox tenant group module" connection: local hosts: localhost gather_facts: False tasks: - name: Create tenant within Netbox with only required information netbox_tenant_group: netbox_url: http://netbox.local netbox_token: thisIsMyToken data: name: Tenant Group ABC state: present - name: Delete tenant within netbox netbox_tenant_group: netbox_url: http://netbox.local netbox_token: thisIsMyToken data: name: Tenant ABC state: absent
data: description: - Defines the tenant group configuration required: true suboptions: name: description: - Name of the tenant group to be created required: true type: str type: dict state: choices: - absent - present default: present description: - Use C(present) or C(absent) for adding or removing. type: str netbox_url: description: - URL of the Netbox instance resolvable by Ansible control host required: true type: str netbox_token: description: - The token created within Netbox to authorize API access required: true type: str validate_certs: default: 'yes' description: - 'If C(no), SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. ' type: bool
msg: description: Message indicating failure or info about what has been achieved returned: always type: str tenant_group: description: Serialized object as created or already existent within Netbox returned: on creation type: dict