DCD-224: Add conversion of env-vars on startup.

This commit is contained in:
Steve Smith
2019-04-08 09:30:19 +10:00
parent 47210ebb69
commit 7b72fcf1fc
2 changed files with 6 additions and 2 deletions

View File

@@ -2,7 +2,11 @@
# !! Rough notes for now, expand later. # !! Rough notes for now, expand later.
## Ansible layout/howto ## Ansible layout
* Global defaults in group_vars/all.yml * Global defaults in group_vars/all.yml
** This is where env-vars should be converted to Ansible vars. It also acts as a required-env list.
** The CF env is usually stored in /etc/atl. The script `bin/ansible-with-atl-env` will run Ansible with that environment set.
* Runtime information about the EC2 environment can be injected by depending on
`aws_metadata` in a role's `meta/main.yml`.

View File

@@ -6,5 +6,5 @@ atl_shared_mountpoint: "/media/atl"
# The following are imports from the environment. These are generally # The following are imports from the environment. These are generally
# set in /etc/atl by the CloudFormation template and sourced before # set in /etc/atl by the CloudFormation template and sourced before
# Ansible is run. # Ansible is run. See bin/ansible-with-atl-env for a convenient wrapper.
atl_efs_id: "{{ lookup('env', 'ATL_EFS_ID') }}" atl_efs_id: "{{ lookup('env', 'ATL_EFS_ID') }}"