Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openshift inventory fails with traceback #57

Closed
Akasurde opened this issue Apr 14, 2021 · 2 comments
Closed

openshift inventory fails with traceback #57

Akasurde opened this issue Apr 14, 2021 · 2 comments
Assignees
Labels
type/bug Something isn't working verified The issue is reproduced
Milestone

Comments

@Akasurde
Copy link
Member

SUMMARY

Openshift inventory from redhat.openshift and community.okd fails with following error -

'InventoryModule' object has no attribute 'fail_json'
ISSUE TYPE
  • Bug Report
COMPONENT NAME

plugins/module_utils/common.py

ANSIBLE VERSION
2.10
CONFIGURATION
OS / ENVIRONMENT
openshift           0.12.0
kubernetes          12.0.1

Collection version

kubernetes.core               1.2.0
community.okd                 1.1.2
STEPS TO REPRODUCE
ansible-inventory -i k8s.yml --list -vv
EXPECTED RESULTS

Inventory returns information about pods

ACTUAL RESULTS
[WARNING]:  * Failed to parse /home/vagrant/k8s.yml with auto plugin: 'InventoryModule' object
has no attribute 'fail_json'
[WARNING]:  * Failed to parse /home/vagrant/k8s.yml with yaml plugin: Plugin configuration
YAML file, not YAML inventory
[WARNING]:  * Failed to parse /home/vagrant/k8s.yml with ini plugin: Invalid host pattern
'plugin:' supplied, ending in ':' is not allowed, this character is reserved to provide a
port.
[WARNING]: Unable to parse /home/vagrant/k8s.yml as an inventory source
[WARNING]: No inventory was parsed, only implicit localhost is available
{
    "_meta": {
        "hostvars": {}
    },
    "all": {
        "children": [
            "ungrouped"
        ]
    }
}
Akasurde added a commit to Akasurde/kubernetes.core that referenced this issue Apr 15, 2021
* inventory plugin does not have module object so fail_json
  will not work. Use AnsibleError instead of ``fail_json``

Fixes: ansible-collections#57

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
@Akasurde
Copy link
Member Author

resolved_by_pr #59

Akasurde added a commit to Akasurde/kubernetes.core that referenced this issue Apr 16, 2021
* inventory plugin does not have module object so fail_json
  will not work. Use AnsibleError instead of ``fail_json``

Fixes: ansible-collections#57

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
@Akasurde Akasurde self-assigned this Apr 16, 2021
@Akasurde Akasurde added type/bug Something isn't working verified The issue is reproduced labels Apr 16, 2021
@Akasurde Akasurde added this to the 2.0.0 milestone Apr 16, 2021
Akasurde added a commit to Akasurde/kubernetes.core that referenced this issue Apr 16, 2021
* inventory plugin does not have module object so fail_json
  will not work. Use AnsibleError instead of ``fail_json``

Fixes: ansible-collections#57

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Akasurde added a commit to Akasurde/kubernetes.core that referenced this issue Apr 16, 2021
* inventory plugin does not have module object so fail_json
  will not work. Use AnsibleError instead of ``fail_json``

Fixes: ansible-collections#57

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Akasurde added a commit to Akasurde/kubernetes.core that referenced this issue Apr 16, 2021
* inventory plugin does not have module object so fail_json
  will not work. Use AnsibleError instead of ``fail_json``

Fixes: ansible-collections#57

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Akasurde added a commit to Akasurde/kubernetes.core that referenced this issue Apr 16, 2021
* inventory plugin does not have module object so fail_json
  will not work. Use AnsibleError instead of ``fail_json``

Fixes: ansible-collections#57

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Akasurde added a commit that referenced this issue Apr 19, 2021
@Akasurde
Copy link
Member Author

PR merged. Closing this issue.

Akasurde added a commit to Akasurde/kubernetes.core that referenced this issue Apr 19, 2021
Fixes: ansible-collections#57

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working verified The issue is reproduced
Projects
None yet
Development

No branches or pull requests

1 participant