networktocode / networktocode.nautobot / 4.5.0 / module / rack Create, update or delete racks within Nautobot | "added in version" 1.0.0 of networktocode.nautobot" Authors: NMikhail Yohman (@FragmentedPacket)networktocode.nautobot.rack (4.5.0) — module
Install with ansible-galaxy collection install networktocode.nautobot:==4.5.0
collections: - name: networktocode.nautobot version: 4.5.0
Creates, updates or removes racks from Nautobot.
- name: "Test Nautobot modules" connection: local hosts: localhost gather_facts: False tasks: - name: Create rack within Nautobot with only required information networktocode.nautobot.rack: url: http://nautobot.local token: thisIsMyToken name: Test rack site: Test Site status: active state: present - name: Delete rack within nautobot networktocode.nautobot.rack: url: http://nautobot.local token: thisIsMyToken name: Test Rack 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 name: description: - The name of the rack. required: true type: str version_added: 3.0.0 version_added_collection: networktocode.nautobot site: description: - Required if I(state=present) and the rack does not exist yet. required: false type: raw version_added: 3.0.0 version_added_collection: networktocode.nautobot tags: description: - Any tags that this item may need to be associated with elements: raw required: false type: list version_added: 3.0.0 version_added_collection: networktocode.nautobot type: choices: - 2-post frame - 4-post frame - 4-post cabinet - Wall-mounted frame - Wall-mounted cabinet description: - The type of rack. required: false type: str version_added: 3.0.0 version_added_collection: networktocode.nautobot 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 width: choices: - 10 - 19 - 21 - 23 description: - The rail-to-rail width. required: false type: int version_added: 3.0.0 version_added_collection: networktocode.nautobot serial: description: - Serial number of the rack. required: false type: str version_added: 3.0.0 version_added_collection: networktocode.nautobot status: description: - The status of the rack - Required if I(state=present) and does not exist yet. required: false type: raw version_added: 3.0.0 version_added_collection: networktocode.nautobot tenant: description: - The tenant that the device will be assigned to. required: false type: raw version_added: 3.0.0 version_added_collection: networktocode.nautobot comments: description: - Comments that may include additional information in regards to the rack. required: false type: str version_added: 3.0.0 version_added_collection: networktocode.nautobot u_height: description: - The height of the rack in rack units. required: false type: int version_added: 3.0.0 version_added_collection: networktocode.nautobot asset_tag: description: - Asset tag that is associated to the rack. required: false type: str version_added: 3.0.0 version_added_collection: networktocode.nautobot rack_role: description: - The rack role the rack will be associated to. required: false type: raw version_added: 3.0.0 version_added_collection: networktocode.nautobot desc_units: description: - Rack units will be numbered top-to-bottom. required: false type: bool version_added: 3.0.0 version_added_collection: networktocode.nautobot outer_unit: choices: - Millimeters - Inches description: - Whether the rack unit is in Millimeters or Inches and is I(required) if outer_width/outer_depth is specified. required: false type: str version_added: 3.0.0 version_added_collection: networktocode.nautobot rack_group: description: - The rack group the rack will be associated to. required: false type: raw version_added: 3.0.0 version_added_collection: networktocode.nautobot api_version: description: - API Version Nautobot REST API required: false type: str version_added: 4.1.0 version_added_collection: networktocode.nautobot facility_id: description: - The unique rack ID assigned by the facility. required: false type: str version_added: 3.0.0 version_added_collection: networktocode.nautobot outer_depth: description: - The outer depth of the rack. required: false type: int version_added: 3.0.0 version_added_collection: networktocode.nautobot outer_width: description: - The outer width of the rack. required: false type: int version_added: 3.0.0 version_added_collection: networktocode.nautobot 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 custom_fields: description: - Must exist in Nautobot and in key/value format required: false type: dict version_added: 3.0.0 version_added_collection: networktocode.nautobot 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
msg: description: Message indicating failure or info about what has been achieved. returned: always type: str rack: description: Serialized object as created or already existent within Nautobot. returned: success (when I(state=present)) type: dict