-
Notifications
You must be signed in to change notification settings - Fork 29
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
Support pack config #42
Comments
Can you expand on this thinking @nicholasamorim. I think I know where you are going with this as I have some of this in a fork, but if you could define your requirements in a more complete way it will help everyone hone in on a path forward. Btw - wouldn't one wish to store things like a private_key in an encrypted datastore value? |
Well, in my specific case, I had to set:
I know that this stuff can be circumvented by using env vars as well as abstracting the But I just think it would be nice to provide a set of defaults in
So an example: cwd: "/path/to/my/plays"
inventory_file: "envs/{{ st2kv('system.ENV') }}/hosts"
private_key: "/home/stanley/.ssh/stanley_rsa"
env:
ANSIBLE_SSH_USER: stanley
ANOTHER_DEFAULT_ENV_VAR: myvalue So these would always be used unless overriden at the action level. Does that make sense? |
I'm 👍 with adding additional This way, most of the configuration could be set via ENV and implementation is easy and convenient with current way how the pack is designed as we just need to pass those envs to Ansible execution. As a bonus, variable precedence is on our side when additional CLI params would override ENVs in default Ansible behavior. Configuration you mentioned above could be transformed to respective env vars: See: https://github.com/ansible/ansible/blob/devel/lib/ansible/config/base.yml for the full list. |
Would it make sense to have certain things as pack config? Very much like
ansible.cfg
in a way.The config could set variables that are commonly used across all runs such as:
private_key
inventory_file
and some global
env
values if need be.The text was updated successfully, but these errors were encountered: