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

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

Open
frippe75 opened this issue Feb 15, 2022 · 1 comment
Open

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

frippe75 opened this issue Feb 15, 2022 · 1 comment

Comments

@frippe75
Copy link

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.

@frippe75
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant