networktocode.nautobot.device_role – Create, update or delete devices roles within Nautobot¶
This plugin is part of the networktocode.nautobot collection (version 3.0.0).
To install it use:
ansible-galaxy collection install networktocode.nautobot.
To use it in a playbook, specify:
New in version 1.0.0: of networktocode.nautobot
Creates, updates or removes devices roles from Nautobot
The below requirements are needed on the host that executes this module.
Tags should be defined as a YAML list
This should be ran with connection
- name: "Test Nautobot modules" connection: local hosts: localhost gather_facts: False tasks: - name: Create device role within Nautobot with only required information networktocode.nautobot.device_role: url: http://nautobot.local token: thisIsMyToken name: Test device role color: FFFFFF state: present - name: Delete device role within nautobot networktocode.nautobot.device_role: url: http://nautobot.local token: thisIsMyToken name: Test Rack role state: absent
Common return values are documented here, the following are the fields unique to this module:
|success (when state=present)||
Serialized object as created or already existent within Nautobot
Message indicating failure or info about what has been achieved