ansible / ansible-kubernetes-modules

DEPRECATED Ansible role containing pre-release K8s modules
Apache License 2.0
73 stars 41 forks source link

List k8s kinds #23

Open rahulinux opened 6 years ago

rahulinux commented 6 years ago

I'm trying to list deployments using:

---
- hosts: localhost
  roles:
     - role: ansible-kubernetes-modules
       install_python_requirements: no

  tasks:
     - k8s_extensions_v1beta1_deployment_list:
         state: present

but it throws : Failed to retrieve requested object: Error: method list_deployment not found for model deployment_list. Did you forget to include the namespace?

and after adding namespace Unsupported parameters for (k8s_apps_v1beta1_deployment_list) module: namespace Supported parameters include: api_key,cert_file,context,debug,dry_run,force,host,key_file,kubeconfig,password,resource_definition,src,ssl_ca_cert,state,username,verify_ssl

fabianvf commented 6 years ago

I think this PR should at least affect this issue, though I'm not sure if it'll fix it or not.

https://github.com/openshift/openshift-restclient-python/pull/122

It's not on pypi yet so if you want to try it out you'll have to pip install from source

pip install https://github.com/openshift/openshift-restclient-python/archive/master.zip

should work