From f6d536fa396d54666f69f4647ee034d5a0810125 Mon Sep 17 00:00:00 2001 From: abikouo Date: Wed, 20 Dec 2023 15:42:47 +0100 Subject: [PATCH] add credentials --- .../test_deploy_flask_app/defaults/main.yml | 4 +--- .../test_deploy_flask_app/tasks/main.yaml | 21 ++++++++++--------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/tests/integration/targets/test_deploy_flask_app/defaults/main.yml b/tests/integration/targets/test_deploy_flask_app/defaults/main.yml index de27871..f5bf1f1 100644 --- a/tests/integration/targets/test_deploy_flask_app/defaults/main.yml +++ b/tests/integration/targets/test_deploy_flask_app/defaults/main.yml @@ -1,3 +1 @@ -aws_security_token: '{{ security_token | default(omit) }}' -aws_region: eu-west-2 -resource_prefix: "ansible-test-91376696-fv-az000-111" \ No newline at end of file +aws_security_token: '{{ security_token | default(omit) }}' \ No newline at end of file diff --git a/tests/integration/targets/test_deploy_flask_app/tasks/main.yaml b/tests/integration/targets/test_deploy_flask_app/tasks/main.yaml index acbbe36..6213de9 100644 --- a/tests/integration/targets/test_deploy_flask_app/tasks/main.yaml +++ b/tests/integration/targets/test_deploy_flask_app/tasks/main.yaml @@ -2,8 +2,10 @@ - name: "Run deploy_flask_app integration tests" module_defaults: group/aws: - aws_profile: eu_london - region: eu-west-2 + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ aws_security_token }}" + region: "{{ aws_region }}" block: - name: Run operation create @@ -17,15 +19,14 @@ deploy_flask_app_vpc_id: "{{ vpc.vpc.id }}" deploy_flask_app_vm_info: "{{ vm_result }}" deploy_flask_app_rds_info: "{{ rds_result }}" - deploy_flask_app_bastion_ssh_private_key: "{{ test_deploy_flask_app__tmpdir.path }}/id_rsa" - # - name: Check that a page returns successfully - # ansible.builtin.uri: - # url: "http://{{ deploy_flask_app_lb_result.elb.dns_name }}:{{ deploy_flask_app_listening_port }}" - # register: deploy_flask_app_check - # until: "deploy_flask_app_check.status == 200" - # retries: 5 - # delay: 10 + - name: Check that a page returns successfully + ansible.builtin.uri: + url: "http://{{ deploy_flask_app_lb_result.elb.dns_name }}:{{ deploy_flask_app_listening_port }}" + register: deploy_flask_app_check + until: "deploy_flask_app_check.status == 200" + retries: 5 + delay: 10 always: # Cleanup after ourselves