This page will just have quick examples that people may have had questions about, but the normal plugin documentation should be referenced for normal usage.
The inventory plugin documentation can be found here.
Using Compose to Set ansible_network_os to Platform Slug¶
--- plugin: networktocode.nautobot.inventory compose: ansible_network_os: platform.slug
Using Keyed Groups to set ansible_network_os to Platform Slug¶
--- plugin: networktocode.nautobot.inventory keyed_groups: - key: platform prefix: "network_os" separator: "_"
The above examples are excerpts from the following blog post.
Using Inventory Plugin Within AWX/Tower¶
This will cover the basic usage of the Nautobot inventory plugin within this collection.
collections/requirements.ymlwithin a Git project.
AWX/Tower will download the collection on each run. This can be handled differently or excluded if storing Ansible Collections on the AWX/Tower box.
inventory.ymlin Git project that adheres to inventory plugin structure.
Add Git project to AWX/Tower as a project.
Create inventory and select
source from project.
Select the AWX/Tower project from Step 2
inventory.ymlfile in the project from Step 3
Make sure your Tower installation uses Python 3 or select the proper
Saveand sync source.