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

Environment variable confusion #78

Closed
Flybro opened this issue Jul 31, 2018 · 1 comment
Closed

Environment variable confusion #78

Flybro opened this issue Jul 31, 2018 · 1 comment

Comments

@Flybro
Copy link

Flybro commented Jul 31, 2018

Hi, Sorry if my question is kind of immature but I really stumbled accross the following error:

fatal: [etc01]: FAILED! => {
    "changed": false, 
    "invocation": {
        "module_args": {
            "authtype": "token", 
            "ca_cert": "", 
            "ca_path": "", 
            "client_cert": "", 
            "client_key": "", 
            "data": {
                "certificates": "abc"
            }, 
            "password": "", 
            "role_id": "", 
            "secret": "kafka", 
            "secret_id": "", 
            "token": "e75b7556-762d-ed89-1dca-9c3923187257", 
            "update": false, 
            "url": "", 
            "username": "", 
            "verify": true
        }
    }, 
    "msg": "Exception: Invalid URL '/v1/secret/kafka': No schema supplied. Perhaps you meant http:///v1/secret/kafka?", 
    "rc": 1
}

I'm trying to run playbook on remote machine. All neccessary variable are set but still no go. Looks like module is not reading env. The token is readed form .vault-token on remote machine instead from env.
This is how I run it:

ansible-playbook -i poc.inv -e VAULT_ADDR=https://bunsen:8200 -e VAULT_TOKEN=e75b7556-762d-ed89-1dca-9c3923187258 poc.yml

poc.yml

---
- hosts: poc
  roles:
    - vault

main.yml:

---
- name: Write secrets
  hashivault_write:
    secret: 'kafka'
    data:
      certificates: 'abc'
  register: 'vault_write'

Any thoughts about how it should be done, please?
Cheers,
BB

@Flybro
Copy link
Author

Flybro commented Aug 1, 2018

Please ignore.

@Flybro Flybro closed this as completed Aug 1, 2018
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