-
-
Notifications
You must be signed in to change notification settings - Fork 607
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
Split up group_vars files #308
Conversation
I really like this! This vault branch demos moving some variables to
/cc @nathanielks |
While we doing this, I submit that we should rename |
@QWp6t |
I dig it! |
didn't like this at first but i dig it now! |
Lol @QWp6t |
I'm still cool. ... right? |
A few more comments about that Ansible vault branch. It's optionalThe playbooks will still run fine if users choose not to encrypt the Finding variable definitionsIf you're looking at an ansible task, see a variable, then search for where the variable was defined in your code/project, your search won't find that definition if it is in a file encrypted by Ansible vault. Quoting Raphael Campardou:
# var_file
db_password: {{ vaulted_db_passord }}
# and for a dctionnary
aws:
- "access_key_id='abcdefgh'"
- "secret_access_key='{{ vaulted_aws_secret_access_key }}'"
# vault_file
vaulted_db_passord: a_super_secret
vaulted_aws_secret_access_key: the_aws_secret In the example above, you might be searching for where I tried that but ran into trouble with the The exception in my branch is Avoiding committing unencrypted vault filesThe README or wiki could mention the option for users to avoid committing unencrypted passwords using this script:
|
Only thing I'd caution against is storing variables in a |
@nathanielks Yeah, there's a real argument for trying to minimize the use of hashes. Ansible does allow a I need to use a hash for variables I extracted from mysql_db: name="{{ vault[item.key].db_name | default(item.key) }}"
⋮
with_dict: wordpress_sites (I didn't try it, but maybe setting The only way I see around using a hash for these example.com_db_name: example_staging
example.com_db_user: example_dbuser
example.com_db_password: example_dbpassword
⋮
|
My body is ready, let's get this show on the road |
Are we merging this soon? |
f197f8b
to
ccf8aee
Compare
Fixes #133.
ccf8aee
to
429e182
Compare
@BrandonShutter yes |
Issue #133 for reference.
Trying this out to see what it looks like.
Benefits:
group_vars
files were just growing a bit unruly as we added moreDownsides?