not able to use variables in plugins.

13 views
Skip to first unread message

Pravin V

unread,
Dec 22, 2020, 10:45:53 AM12/22/20
to Ansible Project
Hello All,
I'm testing  netbox inventory plugin locally. Below is the yml file. If I specify the api_endpoint and token directly like- 
api_endpoint: https://1.1.1.1
token: 2323123123
This way it is working properly. But it's not fetching the details from the variables files.

vars.yml
---
token: 2323123123

inventory.yml
---
plugin: netbox.netbox.nb_inventory
api_endpoint: '{{ api }}'
token: '{{ token }}'
validate_certs: False
config_context: False 
group_by:
  - sites
device_query_filters:
  - has_primary_ip: 'true'

Thanks.
Reply all
Reply to author
Forward
0 new messages