| # Licensed to the Apache Software Foundation (ASF) under one or more contributor |
| # license agreements; and to You under the Apache License, Version 2.0. |
| --- |
| # |
| # Controller 'plugin' that will add the items necessary to the controller |
| # environment to cause the controller to join a specified akka cluster |
| # |
| |
| - name: add akka port to ports_to_expose |
| set_fact: |
| ports_to_expose: >- |
| {{ ports_to_expose }} + |
| [ "{{ (controller.akka.cluster.basePort + (controller_index | int)) }}:" |
| + "{{ controller.akka.cluster.bindPort }}" ] |
| |
| - name: add seed nodes to controller environment |
| set_fact: |
| controller_env: >- |
| {{ controller_env | combine({ |
| 'CONFIG_akka_cluster_seedNodes_' ~ item.0: |
| 'akka.tcp://controller-actor-system@'~item.1~':'~(controller.akka.cluster.basePort+item.0) |
| }) }} |
| with_indexed_items: "{{ controller.akka.cluster.seedNodes }}" |
| |
| - name: Add akka environment to controller environment |
| vars: |
| akka_env: |
| "CONFIG_akka_actor_provider": "{{ controller.akka.provider }}" |
| "CONFIG_akka_remote_netty_tcp_hostname": |
| "{{ controller.akka.cluster.host[(controller_index | int)] }}" |
| "CONFIG_akka_remote_netty_tcp_port": |
| "{{ controller.akka.cluster.basePort + (controller_index | int) }}" |
| "CONFIG_akka_remote_netty_tcp_bindPort": |
| "{{ controller.akka.cluster.bindPort }}" |
| set_fact: |
| controller_env: "{{ controller_env | combine(akka_env) }}" |