diff options
author | Toshio Kuratomi <a.badger@gmail.com> | 2018-12-20 10:07:49 -0800 |
---|---|---|
committer | Toshio Kuratomi <a.badger@gmail.com> | 2019-01-03 18:12:23 -0800 |
commit | 27c7d5bb01f15dc89021a6019c07c10a03ed7035 (patch) | |
tree | 1c63b7cd17113b393a27f7bc6fa4a7f27d282078 /lib/ansible/context.py | |
parent | ed8e60d804973bdb6703daa24255bb8fc24d2988 (diff) | |
download | ansible-27c7d5bb01f15dc89021a6019c07c10a03ed7035.tar.gz |
Move the arguments module into cli/ and context_objects into utils
* Note: Python2 is not as intelligent at detecting false import loops as
Python3. context_objects.py cannot be added to cli/arguments because it
would set up an import loop between cli/__init__.py,
cli/arguments/context_objects.py, and context.py on Python2.
ci_complete
Diffstat (limited to 'lib/ansible/context.py')
-rw-r--r-- | lib/ansible/context.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/ansible/context.py b/lib/ansible/context.py index 3b2c56a182..67786a0292 100644 --- a/lib/ansible/context.py +++ b/lib/ansible/context.py @@ -15,14 +15,18 @@ running the ansible command line tools. These APIs are still in flux so do not use them unless you are willing to update them with every Ansible release """ -from ansible.arguments.context_objects import CLIArgs, GlobalCLIArgs +from ansible.utils.context_objects import CLIArgs, GlobalCLIArgs +__all__ = ('CLIARGS',) + # Note: this is not the singleton version. The Singleton is only created once the program has # actually parsed the args CLIARGS = CLIArgs({}) +# This should be called immediately after cli_args are processed (parsed, validated, and any +# normalization performed on them). No other code should call it def _init_global_context(cli_args): """Initialize the global context objects""" global CLIARGS |