nautobot-ansible icon indicating copy to clipboard operation
nautobot-ansible copied to clipboard

Use Ansible Inventory Compose option for custom_fields on child objects, e.g. platforms

Open FragmentedPacket opened this issue 3 years ago • 0 comments

ISSUE TYPE
  • Feature Idea
SOFTWARE VERSIONS
Ansible:

2.9.3

Nautobot:

1.0.2

Collection:

1.0.4

SUMMARY

We want to be able to compose variables from custom fields on child objects such as platform.

This was discovered by @lvrfrc87

STEPS TO REPRODUCE
plugin: "networktocode.nautobot.inventory"
url: "https://nautobot.dev.net-tools.only.sap/"
token: "token"
validate_certs: false
config_context: true
group_by:
  - tenants
  - platforms
  - device_roles
compose:
  ansible_network_os: platforms.cf_ansible_network_os
#  serial_nr: serial
device_query_filters:
  - has_primary_ip: true
interfaces: false
EXPECTED RESULTS

Inventory will have the ansible_network_os from the custom field on platforms

ACTUAL RESULTS

No ansible_network_os is composed.

FragmentedPacket avatar Jun 02 '21 15:06 FragmentedPacket