productsupcom / ansible-dyninv-mysql Goto Github PK
View Code? Open in Web Editor NEWAnsible Dynamic Inventory for MySQL
Ansible Dynamic Inventory for MySQL
Table: host,group,childgroups,hostgroups
How I insert my host list data into the tables?
In yaml inventroy, we can define a absolute host
mail.example.com
[webservers]
foo.example.com
bar.example.com
[dbservers]
one.example.com
two.example.com
three.example.com
like mail.example.com above.
but in Dynamic Inventory, the host must be in a group?
Do you have any advice, how to initially import data from yml files to mysql tables?
Hello,
The key word VIEW is missing to create the view named children.
Regards
Hi,
Can somebody help me with any example of host
.variables
filling? I use this excellent script to pull all my switches from MySQL and it works perfect with Python 3 but I have several switches that use different username/password and I can't understand how to fill variables to use other name/password combination for these specific switches.
Please, help.
Roman
Hi,
I got a exception on line:189
when 'vars' not in self.inventory[groupname]
.
Line 189 in 8042558
Fixes a bug where a group might not have variables(8b71929)
Maybe self.inventory[group]
should be dict
, not list
.
Is that right? @terwey @tanji
Lines 135 to 136 in 8042558
tables.sql
insert into `host` (id,host,hostname,variables,enabled) values (1,'10.128.0.1','node1','',1);
insert into `group` (id,name,variables,enabled) values (1,'group_A','',1);
insert into `hostgroups` (host_id,group_id) values (1,1);
python mysql.py --list
$ python mysql.py --list
Traceback (most recent call last):
File "mysql.py", line 254, in <module>
MySQLInventory()
File "mysql.py", line 57, in __init__
self.update_cache()
File "mysql.py", line 189, in update_cache
if not self.inventory[group]['hosts']:
TypeError: list indices must be integers, not str
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.