ansible-jupyter-kernel
ansible-jupyter-kernel copied to clipboard
Unable to ping: after installation ansible_kernel using pip3
Hi,
I have installed ansible using pip and my python3 version is 3.6.9
python3 -m pip install ansible-kernel
python3 -m ansible_kernel.install
and when i run ping: on ansible note book i am getting below error.
and ansible config file location is none. how can i configure hosts which is installed by pip. Please help me to resolve this issue.
detailed log is for ping:
{'counter': 7,
'created': '2021-03-30T15:48:51.176928',
'end_line': 7,
'event': 'runner_on_start',
'event_data': {'host': 'localhost',
'play': 'default',
'play_pattern': 'localhost',
'play_uuid': '080027fe-27d6-ee86-6ea5-000000000006',
'playbook': 'playbook.yml',
'playbook_uuid': 'ced3e0ef-f2b6-4d7c-9d49-ec2ccfc9005e',
'task': 'include_vars',
'task_action': 'include_vars',
'task_args': '',
'task_path': '/tmp/ansible_kernel_playbookph9rtyk5/project/playbook.yml:11',
'task_uuid': '080027fe-27d6-ee86-6ea5-00000000000c',
'uuid': '5f514c6d-9647-42e2-bc29-feb97bbd4eb6'},
'parent_uuid': '080027fe-27d6-ee86-6ea5-00000000000c',
'pid': 5086,
'runner_ident': 'a2ca81eb-9103-4ec9-ba9c-cb741619efd8',
'start_line': 7,
'stdout': '',
'uuid': '5f514c6d-9647-42e2-bc29-feb97bbd4eb6'}
{'counter': 10,
'created': '2021-03-30T15:48:51.223221',
'end_line': 10,
'event': 'runner_on_start',
'event_data': {'host': 'localhost',
'play': 'default',
'play_pattern': 'localhost',
'play_uuid': '080027fe-27d6-ee86-6ea5-000000000006',
'playbook': 'playbook.yml',
'playbook_uuid': 'ced3e0ef-f2b6-4d7c-9d49-ec2ccfc9005e',
'task': 'include_tasks',
'task_action': 'include_tasks',
'task_args': '',
'task_path': '/tmp/ansible_kernel_playbookph9rtyk5/project/playbook.yml:13',
'task_uuid': '080027fe-27d6-ee86-6ea5-00000000000d',
'uuid': '1867cc97-a22f-440d-89e3-f9adc0f25d12'},
'parent_uuid': '080027fe-27d6-ee86-6ea5-00000000000d',
'pid': 5086,
'runner_ident': 'a2ca81eb-9103-4ec9-ba9c-cb741619efd8',
'start_line': 10,
'stdout': '',
'uuid': '1867cc97-a22f-440d-89e3-f9adc0f25d12'}
TASK [ping] ********************************************************************
{'counter': 14,
'created': '2021-03-30T15:48:51.272790',
'end_line': 13,
'event': 'runner_on_start',
'event_data': {'host': 'localhost',
'play': 'default',
'play_pattern': 'localhost',
'play_uuid': '080027fe-27d6-ee86-6ea5-000000000006',
'playbook': 'playbook.yml',
'playbook_uuid': 'ced3e0ef-f2b6-4d7c-9d49-ec2ccfc9005e',
'task': 'ping',
'task_action': 'ping',
'task_args': '',
'task_path': '/tmp/ansible_kernel_playbookph9rtyk5/project/next_task0.yml:1',
'task_uuid': '080027fe-27d6-ee86-6ea5-000000000022',
'uuid': '87039cca-7a86-413b-8a2e-8beab01a3586'},
'parent_uuid': '080027fe-27d6-ee86-6ea5-000000000022',
'pid': 5086,
'runner_ident': 'a2ca81eb-9103-4ec9-ba9c-cb741619efd8',
'start_line': 13,
'stdout': '',
'uuid': '87039cca-7a86-413b-8a2e-8beab01a3586'}
/usr/local/py36/3_6_9/lib/python3.6/site-packages/ansible_kernel/kernel.py:757: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
code_data = yaml.load(code)
/usr/local/py36/3_6_9/lib/python3.6/site-packages/ansible_kernel/kernel.py:814: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
current_task_data = yaml.load(self.current_task)
ok: [localhost] => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python"
},
"ping": "pong"
}
{'counter': 17,
'created': '2021-03-30T15:48:51.841732',
'end_line': 16,
'event': 'runner_on_start',
'event_data': {'host': 'localhost',
'play': 'default',
'play_pattern': 'localhost',
'play_uuid': '080027fe-27d6-ee86-6ea5-000000000006',
'playbook': 'playbook.yml',
'playbook_uuid': 'ced3e0ef-f2b6-4d7c-9d49-ec2ccfc9005e',
'task': 'pause_for_kernel',
'task_action': 'pause_for_kernel',
'task_args': '',
'task_path': '/tmp/ansible_kernel_playbookph9rtyk5/project/next_task0.yml:3',
'task_uuid': '080027fe-27d6-ee86-6ea5-000000000023',
'uuid': 'b4ac8adb-4b45-4ca2-a4c6-103ffd1a9301'},
'parent_uuid': '080027fe-27d6-ee86-6ea5-000000000023',
'pid': 5086,
'runner_ident': 'a2ca81eb-9103-4ec9-ba9c-cb741619efd8',
'start_line': 16,
'stdout': '',
'uuid': 'b4ac8adb-4b45-4ca2-a4c6-103ffd1a9301'}
Regards, Zain