-
Bug
-
Resolution: Unresolved
-
Undefined
-
None
-
Unspecified
-
False
-
-
False
-
-
https://github.com/ansible-collections/kubernetes.core/issues/678
<!--- Verify first that your issue is not already reported on GitHub -->
<!--- Also test if the latest release and devel branch are affected too -->
<!--- Complete all sections as described, this form is processed automatically -->
-
-
-
-
- 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...
```
- name: built-in redirect example (works)
k8s_info:
...
async: "120"
poll: "1"
````
This doesn't work...
``` - 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."}```
-
-
-
-
- ISSUE TYPE
-
-
-
- Bug Report
-
-
-
-
- COMPONENT NAME
<!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure -->
- COMPONENT NAME
-
-
-
kubernetes.core.k8s_info
-
-
-
-
- ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```
ansible --version
ansible [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
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
- ANSIBLE VERSION
-
-
-
```
-
-
-
-
- COLLECTION VERSION
<!--- Paste verbatim output from "ansible-galaxy collection list <namespace>.<collection>" between the quotes
for example: ansible-galaxy collection list community.general
-->
```ansible-galaxy collection list kubernetes.core
ansible-galaxy [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-galaxy
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
- COLLECTION VERSION
-
-
-
- /root/.ansible/collections/ansible_collections
Collection Version-
-
-
-
-
-
-
-
-
-
-
-
-
- -------
kubernetes.core 3.0.0
- -------
-
-
-
-
-
-
-
-
-
-
-
-
-
```
-
-
-
-
- CONFIGURATION
<!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes -->
```ansible-config dump --only-changed
ansible-config [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-config
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
CONFIG_FILE() = None
DEFAULT_VERBOSITY(env: ANSIBLE_VERBOSITY) = 2
- CONFIGURATION
-
-
-
```
-
-
-
-
- OS / ENVIRONMENT
<!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. -->
```
cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
```
- OS / ENVIRONMENT
-
-
-
-
-
-
-
- STEPS TO REPRODUCE
<!--- Describe exactly how to reproduce the problem, using a minimal test-case -->
- STEPS TO REPRODUCE
-
-
-
1. export a KUBECONFIG of a kubernetes cluster
2. run `ansible-playbook async-recreate.yml`
<!--- Paste example playbooks or commands between quotes below -->
async-crecreate.yml playbook
```
—
- 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"
```
<!--- HINT: You can paste gist.github.com links for larger files -->
-
-
-
-
- EXPECTED RESULTS
<!--- Describe what you expected to happen when running the steps above -->
```
See TASK [built-in redirect example (works)] below
```
- EXPECTED RESULTS
-
-
-
-
-
-
-
- ACTUAL RESULTS
<!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) -->
- ACTUAL RESULTS
-
-
-
<!--- Paste verbatim command output between quotes -->
``` ansible-playbook async-recreate.yml
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] =>
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! =>
PLAY RECAP *********************************************************************************************************************************************************************************************************
localhost : ok=2 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
```