Skip to content

Commit

Permalink
DBA-844 (#504)
Browse files Browse the repository at this point in the history
Commit Description:
Refactor Alfresco Wallet Role Inclusion to Use include_role

Summary of Change:
Replaced the roles section for the alfresco_wallet role in playbooks/delius-artefacts-playbook.yml with a task that uses the include_role module. This ensures the role is conditionally included at runtime based on the deploy_alfresco_wallet variable.

Reason for Change:
Ansible pre-checks for the existence of roles in the roles section, even when they are conditionally included. This caused errors in workflows (e.g., oracle-db-mis-configuration-artefacts.yml) where the alfresco_wallet role was not needed and its directory did not exist. Using include_role delays role inclusion until the when condition is evaluated, avoiding the unnecessary pre-check and error.
  • Loading branch information
dave-belton authored Jan 21, 2025
1 parent fd6f562 commit 532cec4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions playbooks/delius-artefacts-playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,8 @@
gather_facts: no
become: yes
become_user: oracle
roles:
- { role: "{{ playbook_dir }}/alfresco_wallet/alfresco_wallet", when: ( deploy_alfresco_wallet | default('no') == "yes" ) }
tasks:
- name: Deploy Alfresco Wallet
include_role:
name: "{{ playbook_dir }}/alfresco_wallet/alfresco_wallet"
when: deploy_alfresco_wallet | default('no') == "yes"

0 comments on commit 532cec4

Please sign in to comment.