networktocode.nautobot.device_role – Create, update or delete devices roles within Nautobot¶
This plugin is part of the networktocode.nautobot collection (version 1.0.4).
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
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 data: name: Test device role color: FFFFFF state: present - name: Delete device role within nautobot networktocode.nautobot.device_role: url: http://nautobot.local token: thisIsMyToken data: 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