You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I see differences between indirect and direct references to k8s_info and the async task option. I don't know if this a bug or working as designed. Or if this a builtin redirect isssue?
- name: direct example (doesn't work)
kubernetes.core.k8s_info:
...
async: "120"
poll: "1"
and fails with
task path: /root/molecule/async-recreate.yml:25
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: NoneType: None
fatal: [localhost]: FAILED! => {"changed": false, "msg": "async is not supported for this task."}
---
- name: Show the differences between direct and indirect
hosts: localhost
become: no
tasks:
- name: built-in redirect example (works)
k8s_info:
api_version: v1
kind: Pod
namespace: default
register: _indirect_k8s_info
until: _indirect_k8s_info is successful
delay: "15"
retries: "10"
async: "120"
poll: "1"
- name: direct example (doesn't work)
kubernetes.core.k8s_info:
api_version: v1
kind: Pod
namespace: default
register: _direct_k8s_info
until: _direct_k8s_info is successful
delay: "15"
retries: "10"
async: "120"
poll: "1"
EXPECTED RESULTS
See TASK [built-in redirect example (works)] below
ACTUAL RESULTS
ansible-playbook [core 2.14.14]
config file = None
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /root/.venv/lib/python3.9/site-packages/ansible
ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
executable location = /root/.venv/bin/ansible-playbook
python version = 3.9.17 (main, Jun 13 2023, 16:05:09) [GCC 8.3.0] (/root/.venv/bin/python)
jinja version = 3.1.3
libyaml = True
No config file found; using defaults
[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'
redirecting (type: modules) ansible.builtin.k8s_info to kubernetes.core.k8s_info
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.
PLAYBOOK: async-recreate.yml ***************************************************************************************************************************************************************************************
1 plays in async-recreate.yml
PLAY [Show the differences between direct and indirect] ************************************************************************************************************************************************************
TASK [Gathering Facts] *********************************************************************************************************************************************************************************************
task path: /root/molecule/async-recreate.yml:2
ok: [localhost]
TASK [built-in redirect example (works)] ***************************************************************************************************************************************************************************
task path: /root/molecule/async-recreate.yml:6
redirecting (type: modules) ansible.builtin.k8s_info to kubernetes.core.k8s_info
redirecting (type: modules) ansible.builtin.k8s_info to kubernetes.core.k8s_info
ASYNC OK on localhost: jid=j996967061524.31767
ok: [localhost] => {"ansible_job_id": "j996967061524.31767", "api_found": true, "attempts": 1, "changed": false, "finished": 1, "resources": [], "results_file": "/root/.ansible_async/j996967061524.31767", "started": 1, "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}
TASK [direct example (doesn't work)] *******************************************************************************************************************************************************************************
task path: /root/molecule/async-recreate.yml:18
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: NoneType: None
fatal: [localhost]: FAILED! => {"changed": false, "msg": "async is not supported for this task."}
PLAY RECAP *********************************************************************************************************************************************************************************************************
localhost : ok=2 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
The text was updated successfully, but these errors were encountered:
SUMMARY
I see differences between indirect and direct references to k8s_info and the async task option. I don't know if this a bug or working as designed. Or if this a builtin redirect isssue?
This works...
This doesn't work...
and fails with
ISSUE TYPE
COMPONENT NAME
kubernetes.core.k8s_info
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
STEPS TO REPRODUCE
ansible-playbook async-recreate.yml
async-crecreate.yml playbook
EXPECTED RESULTS
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: