Brian Coca
ee840f3029
fixed function signature
2015-09-17 07:47:51 -04:00
Victor Salgado
54f1560d3e
Fix mutable default argument
2015-09-16 16:49:45 -03:00
James Cammarata
c8f2483d6d
Cleaning up default group creation in inventory parsers
2015-09-16 12:54:54 -04:00
James Cammarata
ff9f5d7dc8
Starting to add additional unit tests for VariableManager
...
Required some rewiring in inventory code to make sure we're using
the DataLoader class for some data file operations, which makes mocking
them much easier.
Also identified two corner cases not currently handled by the code, related
to inventory variable sources and which one "wins". Also noticed we weren't
properly merging variables from multiple group/host_var file locations
(inventory directory vs. playbook directory locations) so fixed as well.
2015-09-04 16:41:38 -04:00
Brian Coca
49d88cef9c
meta: refresh_inventory and several inventory fixes
2015-08-12 10:35:12 -04:00
James Cammarata
ce3ef7f4c1
Making the switch to v2
2015-05-03 21:47:26 -05:00
Serge van Ginderachter
7c96f1d803
InventoryDir: fixing yet another corner case
2014-08-08 08:54:11 +02:00
James Cammarata
d8a7b49b59
Merge branch 'inventorytree' of https://github.com/sergevanginderachter/ansible into sergevanginderachter-inventorytree
2014-06-24 15:21:08 -05:00
Kevin Bell
92bd755b47
Fixed extension filtering in InventoryDirectory
2014-05-14 23:43:14 -07:00
James Cammarata
393124e462
Add pyc/pyo to ignore list for inventory directories
...
Fixes #7308
2014-05-07 09:59:13 -05:00
Serge van Ginderachter
e36e2d38fe
InventoryDir: another fix for the host.groups list
...
In some cases, where a host is mentioned in multiple groups, and those
groups are referenced in multiple ini files, a group could still contain
multiple instances of a group in its host,groups list, where only one of them
is the right group, that exists in the inventory.
2014-04-04 09:27:44 +02:00
Serge van Ginderachter
d3eaa1b79e
InventoryDir: refactor logic
...
Make sure all hosts and groups are unique objects
and that those are referenced uniquely everywhere.
Also fixes test_dir_inventory unit tests which were broken after previous
patches.
modified: lib/ansible/inventory/dir.py
2014-03-25 12:45:00 +01:00
Serge van Ginderachter
cc8efb4aab
inventory groups: make sure group.depth is updated on all grandchildren
2014-03-25 12:45:00 +01:00
Serge van Ginderachter
36f55d3549
inventory directory parser: add host to group only once
2014-03-25 12:45:00 +01:00
Serge van Ginderachter
8b215149d4
inventory directory parser: add groups to parent_groups non-recursively
2014-03-25 12:45:00 +01:00
Serge van Ginderachter
262ba0460a
inventory directory parser: add hosts to group non-recursively
2014-03-25 12:45:00 +01:00
Chris Jacobs
588d4080df
don't want to ignore explicit cwd
2013-06-04 21:06:49 -07:00
Chris Jacobs
69db160e2f
Skip dotfile in hosts dirs
2013-06-04 18:16:09 -07:00
Michael DeHaan
c52abd40b0
Fix for the directory inventory source where depth information on the group was being discarded
...
due to initial copy. New model will reuse the first object and copy attributes on the second.
2013-06-03 11:41:56 -04:00
Michael DeHaan
87788b1d17
Ignore inventory config files when using an inventory directory.
2013-04-20 09:10:19 -04:00
Michael DeHaan
c695aa2d6a
When playbooks fail, attempt to create an inventory file in the inventory directory that allows rerunning
...
of the playbook against only the hosts that failed.
2013-04-07 23:37:10 -04:00
Daniel Hokka Zakrisson
2ff2f05a0f
host.get_variables includes too many variables, use host.vars instead
...
Not quite as attractive, but allows variable precedence and lazy
resolution to work as intended, rather than resolving them on a
per-inventory basis.
2013-03-02 10:26:26 +01:00
Daniel Hokka Zakrisson
ad08995989
Make inventory basedir for directory based inventory be the directory
...
This puts host_vars and group_vars inside of the directory, allowing you
to target a single inventory but still have access to the variables.
2013-03-01 23:22:52 +01:00
Daniel Hokka Zakrisson
d9c6b60b24
Allow inventory to be a directory containing other inventories
2013-03-01 23:22:52 +01:00