From 37805f42e7e91c53315916e719245ce78099075b Mon Sep 17 00:00:00 2001 From: abikouo Date: Tue, 9 Jan 2024 12:25:34 +0100 Subject: [PATCH] Remove dependency with aws_setup_credentials --- roles/deploy_flask_app/meta/main.yaml | 4 ---- roles/deploy_flask_app/tasks/main.yaml | 6 +++++- 2 files changed, 5 insertions(+), 5 deletions(-) delete mode 100644 roles/deploy_flask_app/meta/main.yaml diff --git a/roles/deploy_flask_app/meta/main.yaml b/roles/deploy_flask_app/meta/main.yaml deleted file mode 100644 index 3bf1568b..00000000 --- a/roles/deploy_flask_app/meta/main.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -dependencies: - - role: cloud.aws_ops.aws_setup_credentials -allow_duplicates: true diff --git a/roles/deploy_flask_app/tasks/main.yaml b/roles/deploy_flask_app/tasks/main.yaml index c68cfbf7..6b74ac11 100644 --- a/roles/deploy_flask_app/tasks/main.yaml +++ b/roles/deploy_flask_app/tasks/main.yaml @@ -1,7 +1,11 @@ --- - name: Deploy flask app. module_defaults: - group/aws: "{{ aws_setup_credentials__output }}" + group/aws: + aws_access_key: "{{ aws_access_key | default(omit) }}" + aws_secret_key: "{{ aws_secret_key | default(omit) }}" + security_token: "{{ security_token | default(omit) }}" + region: "{{ region | default(aws_region) }}" vars: deploy_flask_app__resource_prefix: "{{ deploy_flask_app_vm_info.instances.0.public_dns_name | split('.') | first }}" deploy_flask_app__group_id: "{{ deploy_flask_app_vm_info.instances.0.security_groups[0].group_id }}"