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
This commit is contained in:
Brian Coca 2017-08-20 11:20:30 -04:00 committed by Toshio Kuratomi
commit 075ead8fb0
70 changed files with 1862 additions and 1292 deletions

View file

@ -44,7 +44,7 @@ except ImportError:
class ConfigCLI(CLI):
""" Config command line class """
VALID_ACTIONS = ("view", "edit", "update", "dump", "list")
VALID_ACTIONS = ("view", "dump", "list") # TODO: edit, update, search
def __init__(self, args, callback=None):
@ -59,7 +59,6 @@ class ConfigCLI(CLI):
epilog = "\nSee '%s <command> --help' for more information on a specific command.\n\n" % os.path.basename(sys.argv[0]),
desc="View, edit, and manage ansible configuration.",
)
self.parser.add_option('-c', '--config', dest='config_file', help="path to configuration file, defaults to first file found in precedence.")
self.set_action()
@ -70,14 +69,11 @@ class ConfigCLI(CLI):
if self.action == "dump":
self.parser.add_option('--only-changed', dest='only_changed', action='store_true',
help="Only show configurations that have changed from the default")
self.parser.set_usage("usage: %prog dump [options] [-c ansible.cfg]")
elif self.action == "view":
self.parser.set_usage("usage: %prog view [options] [-c ansible.cfg] ")
elif self.action == "edit":
self.parser.set_usage("usage: %prog edit [options] [-c ansible.cfg]")
elif self.action == "update":
self.parser.add_option('-s', '--setting', dest='setting', help="config setting, the section defaults to 'defaults'")
self.parser.set_usage("usage: %prog update [options] [-c ansible.cfg] -s '[section.]setting=value'")
elif self.action == "search":
self.parser.set_usage("usage: %prog update [options] [-c ansible.cfg] <search term>")
self.options, self.args = self.parser.parse_args()
display.verbosity = self.options.verbosity