[
https://issues.apache.org/jira/browse/AIRAVATA-3274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16974318#comment-16974318
]
Marcus Christie commented on AIRAVATA-3274:
-------------------------------------------
Taking some inspiration from this answer:
https://stackoverflow.com/questions/54798683/run-ansible-task-only-once-per-each-unique-fact-value
to use group_by
https://docs.ansible.com/ansible/latest/modules/group_by_module.html.
> Ansible: run webserver setup only once per server
> -------------------------------------------------
>
> Key: AIRAVATA-3274
> URL: https://issues.apache.org/jira/browse/AIRAVATA-3274
> Project: Airavata
> Issue Type: Bug
> Components: Django Portal
> Reporter: Marcus Christie
> Assignee: Marcus Christie
> Priority: Major
>
> In inventory we can have multiple Django portals listed. Some are on the same
> server, some are on their own server. For each unique web server we want to
> run some setup code (the env_setup role, httpd role, etc.).
> Currently, the django.yml playbook runs this setup for the first Django
> portal listed in inventory, but, again, each Django portal listed may be on a
> separate server and that's a common practice since some Django portal
> instances require a dedicated server for resources or other dependencies.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)