mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-14 00:43:06 -06:00
DCD-224: Move EC2 metadata retrieval to aws_common
This commit is contained in:
@@ -8,5 +8,5 @@
|
|||||||
** This is where env-vars should be converted to Ansible vars. It also acts as a required-env list.
|
** 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.
|
** 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
|
* Runtime information about the EC2 environment can be injected by depending on
|
||||||
`aws_metadata` in a role's `meta/main.yml`.
|
`aws_common` in a role's `meta/main.yml` (or adding it to the playbook before
|
||||||
|
the requiring role.
|
||||||
|
|||||||
@@ -6,3 +6,8 @@
|
|||||||
- ec2-utils
|
- ec2-utils
|
||||||
- amazon-ssm-agent
|
- amazon-ssm-agent
|
||||||
- amazon-efs-utils
|
- amazon-efs-utils
|
||||||
|
|
||||||
|
- name: Fetch local EC2 metadata
|
||||||
|
ec2_metadata_facts:
|
||||||
|
# Guard is mostly for testing
|
||||||
|
when: ansible_system_vendor == "Amazon EC2"
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
---
|
---
|
||||||
dependencies:
|
dependencies:
|
||||||
- aws_metadata
|
- aws_common
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
file:
|
file:
|
||||||
state: directory
|
state: directory
|
||||||
path: "{{ atl_shared_mountpoint }}"
|
path: "{{ atl_shared_mountpoint }}"
|
||||||
owner: "{{ product_user }}"
|
owner: "{{ atl_product_user }}"
|
||||||
mode: 0755
|
mode: 0755
|
||||||
|
|
||||||
- name: Enable mountpoint in fstab
|
- name: Enable mountpoint in fstab
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
---
|
|
||||||
|
|
||||||
# This role is primarily intended to be depended on via `meta` by
|
|
||||||
# roles that need runtime information available.
|
|
||||||
|
|
||||||
- name: Fetch local EC2 metadata
|
|
||||||
ec2_metadata_facts:
|
|
||||||
Reference in New Issue
Block a user