Last active
December 8, 2016 16:21
-
-
Save tbielawa/286ba9fe1c25861379ad18dc2b3b994d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ipy | |
Python 2.7.11 (default, Sep 29 2016, 13:33:00) | |
Type "copyright", "credits" or "license" for more information. | |
IPython 3.2.1 -- An enhanced Interactive Python. | |
? -> Introduction and overview of IPython's features. | |
%quickref -> Quick reference. | |
help -> Python's own help system. | |
object? -> Details about 'object', use 'object??' for extra details. | |
In [1]: import os, imp | |
In [2]: ANSIBLE_PATH = imp.find_module('ansible')[1] | |
In [3]: ANSIBLE_PATH | |
Out[3]: '/usr/lib/python2.7/site-packages/ansible' | |
In [4]: DEFAULT_PATH = os.path.join(ANSIBLE_PATH, 'plugins/callback/default.py') | |
In [5]: DEFAULT_PATH | |
Out[5]: '/usr/lib/python2.7/site-packages/ansible/plugins/callback/default.py' | |
In [6]: DEFAULT_MODULE = imp.load_source('ansible.plugins.callback.default', DEFAULT_PATH) | |
--------------------------------------------------------------------------- | |
IOError Traceback (most recent call last) | |
<ipython-input-6-c8c15d40e15d> in <module>() | |
----> 1 DEFAULT_MODULE = imp.load_source('ansible.plugins.callback.default', DEFAULT_PATH) | |
IOError: [Errno 2] No such file or directory | |
In [7]: | |
Do you really want to exit ([y]/n)? | |
$ ls /usr/lib/python2.7/site-packages/ansible cache color.py constants.pyo __init__.pyc module_common.pyo utils | |
callback_plugins color.pyc errors.py __init__.pyo modules | |
callbacks.py color.pyo errors.pyc inventory module_utils | |
callbacks.pyc constants.py errors.pyo module_common.py playbook | |
callbacks.pyo constants.pyc __init__.py module_common.pyc runner | |
$ ls /usr/lib/python2.7/site-packages/ansible/plugins/callback/default.py | |
ls: cannot access /usr/lib/python2.7/site-packages/ansible/plugins/callback/default.py: No such file or directory | |
$ ls /usr/lib/python2.7/site-packages/ansible/callback_plugins/ | |
__init__.py __init__.pyc __init__.pyo noop.py noop.pyc noop.pyo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[~/rhat/openshift/openshift-ansible] 8:16:07 (3f2d180...) | |
$ rpm -q openshift-ansible ansible | |
openshift-ansible-3.4.17-1.git.239.3f2d180.fc23.noarch | |
ansible-1.9.3-2.fc23.noarch | |
[~/rhat/openshift/openshift-ansible] 8:16:33 (3f2d180...) | |
$ md5sum callback_plugins/0_version_requirement.py | |
a80ba3edcb0248226a781817948d8440 callback_plugins/0_version_requirement.py | |
$ ansible-playbook -i ./hosts-custom-cert ./check-certs.yaml | |
Traceback (most recent call last): | |
File "/usr/bin/ansible-playbook", line 324, in <module> | |
sys.exit(main(sys.argv[1:])) | |
File "/usr/bin/ansible-playbook", line 210, in main | |
force_handlers=options.force_handlers, | |
File "/usr/lib/python2.7/site-packages/ansible/playbook/__init__.py", line 181, in __init__ | |
ansible.callbacks.load_callback_plugins() | |
File "/usr/lib/python2.7/site-packages/ansible/callbacks.py", line 51, in load_callback_plugins | |
callback_plugins = [x for x in utils.plugins.callback_loader.all()] | |
File "/usr/lib/python2.7/site-packages/ansible/utils/plugins.py", line 232, in all | |
self._module_cache[path] = imp.load_source('.'.join([self.package, name]), path) | |
File "/home/tbielawa/rhat/os/openshift-ansible/callback_plugins/default.py", line 27, in <module> | |
DEFAULT_PATH | |
IOError: [Errno 2] No such file or directory |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment