Created
February 14, 2019 16:12
-
-
Save alikins/8ab4544601eb5ab4817eb37d0c4e1695 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
[defaults] | |
log_path = $HOME/.ansible/log/ansible.log | |
retry_files_enabled = false | |
nocows = 1 | |
installed_content_roots = $HOME/.ansible/content | |
[ssh_connection] | |
[paramiko] |
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
ansible 2.8.0.dev0 | |
config file = /home/adrian/src/testcollections/collection_inspect/ansible.cfg | |
configured module search path = ['/home/adrian/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] | |
ansible python module location = /home/adrian/src/ansible/lib/ansible | |
executable location = /home/adrian/src/ansible/bin/ansible | |
python version = 3.6.6 (default, Jul 19 2018, 16:29:00) [GCC 7.3.1 20180303 (Red Hat 7.3.1-5)] |
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
(ansible-py3) [newswoop:F27:collection_inspect (master % u=)]$ tree ~/.ansible/content/alikins/collection_inspect/ | |
/home/adrian/.ansible/content/alikins/collection_inspect/ | |
├── docs | |
├── galaxy.yml | |
├── __init__.py | |
├── meta | |
├── playbooks | |
│ ├── tasks | |
│ ├── test_filters.yml | |
│ └── test_lookup.yml | |
├── plugins | |
│ ├── action | |
│ │ ├── collection_inspect.py | |
│ │ └── __init__.py | |
│ ├── cache | |
│ │ └── __init__.py | |
│ ├── callback | |
│ │ ├── collection_inspect.py | |
│ │ └── __init__.py | |
│ ├── cliconf | |
│ │ └── __init__.py | |
│ ├── connection | |
│ │ └── __init__.py | |
│ ├── doc_fragments | |
│ │ └── __init__.py | |
│ ├── filter | |
│ │ ├── collection_inspect.py | |
│ │ └── __init__.py | |
│ ├── httpapi | |
│ │ └── __init__.py | |
│ ├── __init__.py | |
│ ├── inventory | |
│ │ └── __init__.py | |
│ ├── lookup | |
│ │ ├── collection_inspect.py | |
│ │ └── __init__.py | |
│ ├── modules | |
│ │ ├── collection_inspect.py | |
│ │ └── __init__.py | |
│ ├── module_utils | |
│ │ ├── collection_inspect.py | |
│ │ └── __init__.py | |
│ ├── netconf | |
│ │ └── __init__.py | |
│ ├── shell | |
│ │ └── __init__.py | |
│ ├── strategy | |
│ │ └── __init__.py | |
│ ├── terminal | |
│ │ └── __init__.py | |
│ ├── test | |
│ │ └── __init__.py | |
│ └── vars | |
│ ├── collection_inspect.py | |
│ └── __init__.py | |
├── roles | |
└── tests | |
25 directories, 30 files | |
(ansible-py3) [newswoop:F27:collection_inspect (master % u=)]$ cat ~/.ansible/content/alikins/collection_inspect/__init__.py | |
from pkgutil import extend_path | |
__path__ = extend_path(__path__, __name__) | |
(ansible-py3) [newswoop:F27:collection_inspect (master % u=)]$ cat ~/.ansible/content/alikins/collection_inspect/plugins/__init__.py | |
from pkgutil import extend_path | |
__path__ = extend_path(__path__, __name__) | |
(ansible-py3) [newswoop:F27:collection_inspect (master % u=)]$ cat ~/.ansible/content/alikins/collection_inspect/plugins/lookup/__init__.py | |
from pkgutil import extend_path | |
__path__ = extend_path(__path__, __name__) | |
(ansible-py3) [newswoop:F27:collection_inspect (master % u=)]$ ls ~/.ansible/content/alikins/collection_inspect/plugins/lookup/ | |
collection_inspect.py __init__.py |
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
(ansible-py3) [newswoop:F27:collection_inspect (master % u=)]$ ansible-playbook-alog -vvvvv playbooks/test_lookup.yml | |
ansible-playbook-alog 2.8.0.dev0 | |
config file = /home/adrian/src/testcollections/collection_inspect/ansible.cfg | |
configured module search path = ['/home/adrian/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] | |
ansible python module location = /home/adrian/src/ansible/lib/ansible | |
executable location = /home/adrian/src/ansible/bin/ansible-playbook-alog | |
python version = 3.6.6 (default, Jul 19 2018, 16:29:00) [GCC 7.3.1 20180303 (Red Hat 7.3.1-5)] | |
Using /home/adrian/src/testcollections/collection_inspect/ansible.cfg as config file | |
setting up inventory plugins | |
host_list declined parsing /etc/ansible/hosts as it did not pass it's verify_file() method | |
Skipping due to inventory source not existing or not being readable by the current user | |
script declined parsing /etc/ansible/hosts as it did not pass it's verify_file() method | |
auto declined parsing /etc/ansible/hosts as it did not pass it's verify_file() method | |
Skipping due to inventory source not existing or not being readable by the current user | |
yaml declined parsing /etc/ansible/hosts as it did not pass it's verify_file() method | |
Skipping due to inventory source not existing or not being readable by the current user | |
ini declined parsing /etc/ansible/hosts as it did not pass it's verify_file() method | |
Skipping due to inventory source not existing or not being readable by the current user | |
toml declined parsing /etc/ansible/hosts as it did not pass it's verify_file() method | |
[WARNING]: No inventory was parsed, only implicit localhost is available | |
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all' | |
Loading callback plugin default of type stdout, v2.0 from /home/adrian/src/ansible/lib/ansible/plugins/callback/default.py | |
PLAYBOOK: test_lookup.yml ****************************************************************************************************************************************************************************************** | |
Positional arguments: playbooks/test_lookup.yml | |
verbosity: 5 | |
connection: smart | |
timeout: 10 | |
become_method: sudo | |
tags: ('all',) | |
inventory: ('/etc/ansible/hosts',) | |
forks: 5 | |
2 plays in playbooks/test_lookup.yml | |
PLAY [The first play] ********************************************************************************************************************************************************************************************** | |
META: ran handlers | |
TASK [debug] ******************************************************************************************************************************************************************************************************* | |
task path: /home/adrian/src/testcollections/collection_inspect/playbooks/test_lookup.yml:12 | |
ok: [localhost] => { | |
"msg": "Just a test message for a callback" | |
} | |
TASK [try to find lookup plugin alikins.collection_inspect.collection_inspect] ************************************************************************************************************************************* | |
task path: /home/adrian/src/testcollections/collection_inspect/playbooks/test_lookup.yml:15 | |
11:11:32,995 D ansible.plugins.loader.PluginLoader(LookupModule) WorkerProcess-2:6199 _find_fq_plugin:288 - find fq_name=alikins.collection_inspect.collection_inspect extension=.py | |
11:11:32,996 D ansible.plugins.loader.PluginLoader(LookupModule) WorkerProcess-2:6199 _find_fq_plugin:317 - Calling pkgutil.get_data(a.alikins.collection_inspect.plugins.lookup, collection_inspect.py) based on fq_name=a.alikins.collection_inspect.collection_inspect, ext=.py | |
The full traceback is: | |
Traceback (most recent call last): | |
File "/home/adrian/src/ansible/lib/ansible/executor/task_executor.py", line 144, in run | |
res = self._execute() | |
File "/home/adrian/src/ansible/lib/ansible/executor/task_executor.py", line 573, in _execute | |
self._task.post_validate(templar=templar) | |
File "/home/adrian/src/ansible/lib/ansible/playbook/task.py", line 267, in post_validate | |
super(Task, self).post_validate(templar) | |
File "/home/adrian/src/ansible/lib/ansible/playbook/base.py", line 382, in post_validate | |
value = templar.template(getattr(self, name)) | |
File "/home/adrian/src/ansible/lib/ansible/template/__init__.py", line 554, in template | |
disable_lookups=disable_lookups, | |
File "/home/adrian/src/ansible/lib/ansible/template/__init__.py", line 509, in template | |
disable_lookups=disable_lookups, | |
File "/home/adrian/src/ansible/lib/ansible/template/__init__.py", line 771, in do_template | |
res = j2_concat(rf) | |
File "<template>", line 11, in root | |
File "/home/adrian/venvs/ansible-py3/lib/python3.6/site-packages/jinja2/runtime.py", line 262, in call | |
return __obj(*args, **kwargs) | |
File "/home/adrian/src/ansible/lib/ansible/template/__init__.py", line 657, in _lookup | |
instance = self._lookup_loader.get(name.lower(), loader=self._loader, templar=self) | |
File "/home/adrian/src/ansible/lib/ansible/plugins/loader.py", line 496, in get | |
path = self.find_plugin(name) | |
File "/home/adrian/src/ansible/lib/ansible/plugins/loader.py", line 452, in find_plugin | |
plugin = self._find_plugin(name, mod_type=mod_type, ignore_deprecated=ignore_deprecated, check_aliases=check_aliases) | |
File "/home/adrian/src/ansible/lib/ansible/plugins/loader.py", line 374, in _find_plugin | |
return self._find_fq_plugin(name, suffix) | |
File "/home/adrian/src/ansible/lib/ansible/plugins/loader.py", line 319, in _find_fq_plugin | |
plugin_content = pkgutil.get_data(package, resource) | |
File "/usr/lib64/python3.6/pkgutil.py", line 616, in get_data | |
spec = importlib.util.find_spec(package) | |
File "/home/adrian/venvs/ansible-py3/lib64/python3.6/importlib/util.py", line 88, in find_spec | |
parent = __import__(parent_name, fromlist=['__path__']) | |
ModuleNotFoundError: No module named 'a' | |
fatal: [localhost]: FAILED! => { | |
"msg": "Unexpected failure during module execution.", | |
"stdout": "" | |
} | |
PLAY RECAP ********************************************************************************************************************************************************************************************************* | |
localhost : ok=1 changed=0 unreachable=0 failed=1 skipped=0 | |
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
--- | |
- name: The first play | |
hosts: local_test | |
gather_facts: false | |
vars: | |
# lookup_loader_info: "{{ lookup('alikins.collection_inspect.lookup.collection_inspect', 'dummy') }}" | |
# lookup_loader_info2: "{{ lookup('alikins.collection_inspect.collection_inspect', 'dummy') }}" | |
# lookup_loader_info3: "{{ lookup('alikins.collection_inspect.collection_inspect', 'dummy') }}" | |
# lookup_loader_info4: "{{ lookup('collection_inspect', 'dummy') }}" | |
tasks: | |
- debug: | |
msg: "Just a test message for a callback" | |
- name: try to find lookup plugin alikins.collection_inspect.collection_inspect | |
set_fact: | |
blip: "{{ lookup('alikins.collection_inspect.collection_inspect', 'dummy') }}" | |
- name: try to find lookup plugin alikins.collection_inspect.lookup.collection_inspect | |
set_fact: | |
blip: "{{ lookup('alikins.collection_inspect.lookup.collection_inspect', 'dummy') }}" | |
- name: show lookup loader info data | |
debug: | |
var: lookup_loader_info | |
- name: a become play | |
hosts: local_test | |
tags: | |
- a_become_play_tag | |
gather_facts: false | |
become_method: sudo | |
tasks: | |
- debug: | |
msg: "{{ lookup('collection_inspect', 'dummy')}}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment