ansible_constructed_inventory's People
ansible_constructed_inventory's Issues
Source script fails to retrieve credentials values
Hello Mr.Harrison,
first of all thank you for your blog "Ansible Constructed Inventory Plugin". Actually, i wanted to create dynamic inventory (that will contain dynamic groups) from GLPI so i used two plugins: "Ansible dynamic inventory for GLPI" customized plugin to retrieve infomation from GLPI and constructed plugin to create dynamic groups as you recommended, it does work properly in AWX but when i tried to use AWX credential management i'm always having the error indicating that he couldn't parse the variables:
Input configuration:
fields:
- id: url
type: string
label: url
- id: apptoken
type: string
label: apptoken
secret: true
- id: usertoken
type: string
label: usertoken
secret: true
required:
- apptoken
- usertoken
- url
Injector configuration:
env:
GLPI_URL: '{{ url }}'
GLPI_APPTOKEN: '{{ apptoken }}'
GLPI_USERTOKEN: '{{ usertoken }}'
source file glpi.yml:
plugin: unistra.glpi.inv
glpi_url: "{{ GLPI_URL }}"
glpi_apptoken: "{{ GLPI_APPTOKEN }}"
glpi_usertoken: "{{ GLPI_USERTOKEN }}"
glpi_verify_certs: False
glpi_use_headers: True
queries:
#
# Servers by system
#
glpi-non-prod-all-hosts:
itemtype: Computer
fields:
- 1 # name
- 4 # ComputerType.name
- 31 # State.completename
criteria:
- { link: AND, field: 31, searchtype: contains, value: '^EN SERVICE$' }
hostname: $1
hostvars:
computertype: $4
state: $31
and i've created credentails and put the values as shown:
and i've configured the source with the target credentials:
but i'm always getting this error message :
Also when i tried to remove these three lines from my source script as you recommended :
<glpi_url: "{{ GLPI_URL }}"
glpi_apptoken: "{{ GLPI_APPTOKEN }}"
glpi_usertoken: "{{ GLPI_USERTOKEN }}" >
=> I'm almost getting the same error that he can't find glpi access details.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.