Skip to content

Commit

Permalink
Merge pull request #112 from GomathiselviS/integ_tests_fix
Browse files Browse the repository at this point in the history
Fix test failures in deploy_flask_app and backup_select_resources roles
  • Loading branch information
GomathiselviS authored Apr 26, 2024
2 parents 7a63084 + cc253ca commit 5482e9e
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 7 deletions.
3 changes: 3 additions & 0 deletions changelogs/fragments/backup_select_resource_bug_fix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
bugfixes:
- Fix incorrect dict attribute in backup_select_resources role.
3 changes: 3 additions & 0 deletions changelogs/fragments/fix_rds_db_version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
minor_changes:
- Replace the postgres db engine version from 14.8 to 16.2
2 changes: 1 addition & 1 deletion playbooks/webapp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ To delete the webapp:
* **rds_instance_class** (str): DB instance class for the RDS instance. Default: `db.m6g.large`
* **rds_instance_name** (str): Name for the database. Default: `mysampledb123`
* **rds_engine** (str): Engine to use for the database. Default: `postgres`
* **rds_engine_version** (str): Version number of the database engine to use. Default: `"14.8"`
* **rds_engine_version** (str): Version number of the database engine to use. Default: `"16.2"`
* **deploy_flask_app_rds_master_username** (str): Name of the master user for the database instance. Default: `ansible`
* **deploy_flask_app_rds_master_password** (str): Password for the master database user. Default: `L#5cH2mgy_`

Expand Down
2 changes: 1 addition & 1 deletion playbooks/webapp/vars/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ rds_allocated_storage_gb: 20
rds_instance_class: db.m6g.large
rds_instance_name: mysampledb123
rds_engine: postgres
rds_engine_version: "14.8"
rds_engine_version: "16.2"
bastion_host_type: t3.micro
bastion_host_venv_path: ~/env
rds_listening_port: 5432
Expand Down
2 changes: 1 addition & 1 deletion roles/backup_select_resources/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@

- name: Set backup role ARN
ansible.builtin.set_fact:
backup_select_resources_backup_role_arn: "{{ backup_select_resources_role_info.iam_roles[0].arn if backup_select_resources_new_role_info is skipped else backup_select_resources_new_role_info.arn }}"
backup_select_resources_backup_role_arn: "{{ backup_select_resources_role_info.iam_roles[0].arn if backup_select_resources_new_role_info is skipped else backup_select_resources_new_role_info.iam_role.arn }}"

- name: Create or update backup selection
amazon.aws.backup_selection:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
- "{{ secgroup.group_id }}"
user_data: |
#!/bin/bash
yum install -y python3 python-virtualenv sshpass netcat ansible
yum install -y python3 python3-virtualenv sshpass netcat ansible-core
wait: true
state: started
register: vm_result
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ rds_allocated_storage_gb: 20
rds_instance_class: db.m6g.large
rds_instance_name: mysampledb123
rds_engine: postgres
rds_engine_version: "14.8"
rds_engine_version: "16.2"
bastion_host_type: t3.micro
bastion_host_venv_path: ~/env
image_filter: Fedora-Cloud-Base-38-*
image_filter: Fedora-Cloud-Base-39-*
bastion_host_iam_role: "{{ resource_prefix }}-role"

# vars for the deploy_flask_app role and create task
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/targets/test_deploy_flask_app/runme.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ trap 'cleanup "${@}"' ERR
ansible-playbook run.yaml -e "run_deploy_flask_app_operation=create" "$@"

# Delete web application
ansible-playbook run.yaml -e "run_deploy_flask_app_operation=delete" "$@"
ansible-playbook run.yaml -e "run_deploy_flask_app_operation=delete" "$@"

0 comments on commit 5482e9e

Please sign in to comment.