-
Notifications
You must be signed in to change notification settings - Fork 19
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
ansible-config #35
Comments
This would be great, but I'm curious how it would interoperate with vault. |
I really like the idea and the flexibility it gives you, the only thing which I'm not sure I'm the fan of is using YAML, because from your example this ini format:
is replaced with: ANSIBLE_COW_SELECTION:
desc: Allows choosing specific cowsay stencils, use 'random' to cycle through them
ini:
section: defaults
key: cow_selection
env: ANSIBLE_COW_SELECTION
type: string
default: null The ini file is far more easier to read/edit and understand. Of course YAML gives you additional info, but is all of it important except the environment variable which can be used, but you can put the variable in the comment of the ini file as well. This YAML is awesome when you want to add some new option (as you added main:
defaults:
cow_selection: 'defaults' The reason why I'm saying this, is that most often you would like to override some ini value for a project/role/play, but the above option feels too complicated for that. |
@jhawkesworth that is already been added in 2.2 @kustodian that exmaple is the 'data definition' not the config file, the config file looks like this:
|
@bcoca that config file looks great :) |
@bcoca YAML formatting, always +1. This proposal allows for proper meta data (not loosely filled comment fields) and being declarative for everyone to read and understand in the whole otherwise YAML oriented Ansible setup. |
How about runtime configuration too?
or
As an alternative to:
|
@willthames we currently have an ANSIBLE_CONFIG option, which with the proposed 'mergable' toggles would act the same. I'm not against adding a |
Would we be able to auto generate a new page on docs.ansible.com from this? |
@gundalow yes, all that is part of the plan .. just not sure when it will be ready |
@bcoca just making sure... Am I mistaken or it looks like the plugin portion of the spec hasn't been implemented yet ? For example there is the notion of plugins in ConfigData but seemingly nothing that loads actual plugins and their configuration into _plugins. I ask because I might want to get involved into this for ARA. |
it is a work in progress, I expect most features to be done in time for 2.4, but this project will probably extend into 2.5 |
Is there any update on this issue? It didn't ship with 2.6 ( as far as I'm concerned ). Is it still on the roadmap? We're currently facing an extreme amount of config duplication across our different ansible projects which would be elegantly solved by outsourcing most of the settings into a common ansible.cfg and only overwriting those that are needed. |
it is waiting for other projects to be finalized as they can influence how this would take final shape, so I am still planing on finishing all the features noted above, but this is a 'multi release' project. |
@bcoca how can I be involved in this? I would like to help. |
+1 |
I guess there is still no news on this? :( (Or am I missing something? Current docs, 2.9, states it is still the "first file behavior") |
Maybe this simple shell workaround can help some people. |
We can close ansible/ansible#61778 in favor of this. I believe it's covered by the agenda here. |
Adding plugin support ansible/ansible#49627 |
Is it still impossible to read and use multiple config files? E.g. - i wanna use Or maybe is there a way to also read |
Proposal: ansible-config
Author: Brian Coca @bcoca
Date: 2016/10/-1
Draft implementation: ansible/ansible#12797
Motivation
The current configuration system is limited to a single file and previously hardcoded entries in constants.py. We want to allow plays, plugins and even roles to add config settings when they need them.
Problems
Solution proposal
meta/
dir adjacent to play that can host a config.yml specificOther options
meta/config.yml
for roles, same purpose as play oneread_config_from_role = no|yes
Config Data definition
Example config file:
Example config definition file:
The text was updated successfully, but these errors were encountered: