Coder Social home page Coder Social logo

hashivault_vars's People

Contributors

easybe avatar gbevan avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

hashivault_vars's Issues

ansible_connection in secret paths

I have ansible_connection set in group_vars/all.yml. At least in my setup hashivault_vars is executed before host_group_vars. Therefore, ansible_connection is not set yet when hashivault_vars is run, which leads to the wrong protocol being used.

I, personally, do not need to be able to have different secrets depending on the protocol. I would be happy with /secret/ansible/hosts/hosta.example.com. Anyway, any ideas on how to solve this? I do not want to set ansible_connection in Vault. I only would like to keep secrets there.

hashivault_vars .... how would be works?

Hi.. @easybe and @gbevan ..
we found this repository with good project and we are trying to implement on our virtual environment

we are using right now ansible-5.2
installed hashivault_vars 0.2.0 without any errors using pip
ansible 5.2 in this case use python 3.8

we recreate this path on vault for test

/secret/ansible/groups/all

inside a simple var for example:

testvar = '123abc'

vault kv get secret/ansible/groups/all
======= Metadata =======
Key                Value
---                -----
created_time       2022-02-15T14:55:53.343017959Z
custom_metadata    <nil>
deletion_time      n/a
destroyed          false
version            1

===== Data =====
Key        Value
---        -----
testvar    123abc

and on playbook test can't found this var

- name: Lookup hashicorp vault secrets
  hosts: localhost
  gather_facts: false
  connection: local
  vars:

  tasks:
    - name: Debug
      ansible.builtin.debug:
        msg: "{{ testvar }}"

output:

TASK [Debug test 3] *****************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! =>
  msg: |-
    The task includes an option with an undefined variable. The error was: 'testvar' is undefined

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.