hpe-container-platform-community/hpecp-python-library

Python client allows authentication via ENV's the CLI does not

frippe75 opened this issue · 1 comments

Would be nice if the CLI would check for ENV just like the Python client seems to provide. Easy fix?
Tried setting up the dev-env to have a go but could not pull the docker image (I guess not on Docker hub).

$ env | grep HPECP
HPECP_PASSWORD=******
HPECP_API_PORT=8080
HPECP_VERIFY_SSL=False
HPECP_USE_SSL=False
HPECP_WARN_SSL=False
HPECP_USERNAME=admin
HPECP_API_HOST=ezmeral-cluster.*****.***

$ unset HPECP_CONFIG_FILE

$ hpecp k8sworker list
Could not find configuration file '/home/ansible/.hpecp.conf'

Would like to run this via Ansible and was thinking I'd skip creating modules that uses the Python client and rather go for a more blunt usage via shell/command module.

This would simplify calling from Ansible using Vault for secrets like:

- name: Create K8S Worker
  shell: |
    hpecp k8sworker create-with-ssh-key --ip {{ ansible_host }} --ssh-key {{ ezmeral_admin_privkey }}
  environment: "{{ hpecp }}"
  delegate_to: localhost