Merge "Define condition for the first play host one time"
This commit is contained in:
commit
8a4c92ee7e
@ -28,7 +28,7 @@
|
||||
- always
|
||||
|
||||
- import_tasks: db_setup.yml
|
||||
when: inventory_hostname == groups['adjutant_all'][0]
|
||||
when: _adjutant_is_first_play_host
|
||||
vars:
|
||||
_oslodb_setup_host: "{{ adjutant_galera_setup_host }}"
|
||||
_oslodb_ansible_python_interpreter: "{{ adjutant_galera_setup_python_interpreter }}"
|
||||
@ -70,7 +70,7 @@
|
||||
- adjutant-config
|
||||
|
||||
- import_tasks: adjutant_db_sync.yml
|
||||
when: inventory_hostname == groups['adjutant_all'][0]
|
||||
when: _adjutant_is_first_play_host
|
||||
tags:
|
||||
- adjutant-config
|
||||
|
||||
@ -102,7 +102,7 @@
|
||||
- interface: "admin"
|
||||
url: "{{ adjutant_service_adminurl }}"
|
||||
service: "{{ adjutant_service_name }}"
|
||||
when: inventory_hostname == groups['adjutant_all'][0]
|
||||
when: _adjutant_is_first_play_host
|
||||
tags:
|
||||
- adjutant-config
|
||||
|
||||
|
@ -13,6 +13,8 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
_adjutant_is_first_play_host: "{{ (adjutant_services['adjutant-api']['group'] in group_names and inventory_hostname == (groups[adjutant_services['adjutant-api']['group']] | intersect(ansible_play_hosts)) | first) | bool }}"
|
||||
|
||||
filtered_adjutant_services: |-
|
||||
{% set services = [] %}
|
||||
{% for key, value in adjutant_services.items() %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user