Commit Graph

21 Commits (18d605a132a9d72802bb51000486d05278a729b7)

Author SHA1 Message Date
André Althaus a9b15ce881 Scan group_vars/host_vars in sorted order 7 years ago
Brian Coca e7941b0d4e
avoid chroot paths (#32778)
* avoid chroot paths

fixes #32764

* check name
7 years ago
Toshio Kuratomi cc343a4376 Port ansible doc for plugins to use DOCUMENTATION variables
* Using docstrings conflicts with the standard use of docstrings
* PYTHON_OPTIMIZE=2 will omit docstrings.  Using docstrings makes future
  changes to the plugin and module code subject to the requirement that we
  ensure it won't be run with optimization.
7 years ago
Brian Coca 075ead8fb0 fixes to config/setting retrieval
- better variable precedence management
- universal plugin option handling
- also updated comments for future directions
- leverage fragments for plugins
- removed fact namespacing
- added 'firendly name' field
- updated missing descriptions
- removed some unused yaml entries, updated others to reflect possible future
- documented more plugins
- allow reading docs using alias
- short licenses
- corrected args for 'all plugins'
- fixed -a option for ansible-doc
- updated vars plugins to allow docs
- fixed 'gathering'
- only set options IF connection
- added path list and renamed pathspec mostly the diff is , vs : as separator
- readded removed config entries that were deprecated but had no message ... and deprecated again
- now deprecated entries give warning when set
7 years ago
Brandon Schlueter 0e334ca821 Don't compare group_vars paths with bytestrings (#27922)
* Don't compare group_vars paths with bytestrings

* Compare spath with unicode string in VarsModule
7 years ago
Toshio Kuratomi 3f12fccd02 Fix several things causing tracebacks with unicode cwd (#27731)
Fixes #27511
7 years ago
Brian Coca e08f068dca ensure proper typing of path, cause py3 listdir
since now output is based on input, we need to make sure its always same
fixes #25856
7 years ago
René Moser 6feee18292 host_group_vars: skip files having blacklisted ending (#25730)
* vars: skip backup files

* vars: extend doc for ignored files
7 years ago
Rene Moser 46c6eb37d0 vars: fix typo s/path/spath 7 years ago
Rene Moser 43468b825d vars: fixed missing path in splitext() 7 years ago
Matt Clay 3eea649cbb PEP 8 fixes. 7 years ago
Brian Coca 13a1111dde tighter host/group_var discovery
now only loads nonext or valid yaml extensions
only first file gets loaded
directories must match name (initially) so no name.yml is loaded anymore
7 years ago
Brian Coca 077ca3e07d skip hidden files for {host,group}_vars
fixes #25712
7 years ago
Dag Wieers 5553b20828 Collated PEP8 fixes (#25293)
- Make PEP8 compliant
7 years ago
Brian Coca 7c325470e2 Pepe Ate 7 years ago
Brian Coca f23920aa5e optimize file finding 7 years ago
Brian Coca 40b222867f ensure fullpaths on vars files (#24990)
fixes #24970
now correctly picks up group/host vars inside group/host named directories
7 years ago
John R Barker c158705c48 Fix pep8 issue
lib/ansible/plugins/vars/host_group_vars.py:74:41: E261 at least two spaces before inline comment
Caused by daef6f0911
7 years ago
Brian Coca daef6f0911 allow empty files in host/group_vars
also remove unused import
fixes #24963
7 years ago
Brian Coca 8f97aef1a3 Transition inventory into plugins (#23001)
* draft new inventory plugin arch, yaml sample

 - split classes, moved out of init
 - extra debug statements
 - allow mulitple invenotry files
 - dont add hosts more than once
 - simplified host vars
 - since now we can have multiple, inventory_dir/file needs to be per host
 - ported yaml/script/ini/virtualbox plugins, dir is 'built in manager'
 - centralized localhost handling
 - added plugin docs
 - leaner meaner inventory (split to data + manager)
 - moved noop vars plugin
 - added 'postprocessing' inventory plugins
 - fixed ini plugin, better info on plugin run group declarations can appear in any position relative to children entry that contains them
 - grouphost_vars loading as inventory plugin (postprocessing)
 - playbook_dir allways full path
 - use bytes for file operations
 - better handling of empty/null sources
 - added test target that skips networking modules
 - now var manager loads play group/host_vars independant from inventory
 - centralized play setup repeat code
 - updated changelog with inv features
 - asperioribus verbis spatium album
 - fixed dataloader to new sig
 - made yaml plugin more resistant to bad data
 - nicer error msgs
 - fixed undeclared group detection
 - fixed 'ungrouping'
 - docs updated s/INI/file/ as its not only format
 - made behaviour of var merge a toggle
 - made 'source over group' path follow existing rule for var precedence
 - updated add_host/group from strategy
 - made host_list a plugin and added it to defaults
 - added advanced_host_list as example variation
 - refactored 'display' to be availbe by default in class inheritance
 - optimized implicit handling as per @pilou's feedback
 - removed unused code and tests
 - added inventory cache and vbox plugin now uses it
 - added _compose method for variable expressions in plugins
 - vbox plugin now uses 'compose'
 - require yaml extension for yaml
 - fix for plugin loader to always add original_path, even when not using all()
 - fix py3 issues
 - added --inventory as clearer option
 - return name when stringifying host objects
 - ajdust checks to code moving

* reworked vars and vars precedence
 - vars plugins now load group/host_vars dirs
 - precedence for host vars is now configurable
 - vars_plugins been reworked
 - removed unused vars cache
 - removed _gathered_facts as we are not keeping info in host anymore
 - cleaned up tests
 - fixed ansible-pull to work with new inventory
 - removed version added notation to please rst check
 - inventory in config relative to config
 - ensures full paths on passed inventories

* implicit localhost connection local
7 years ago
James Cammarata ce3ef7f4c1 Making the switch to v2 10 years ago