Merge "Define condition for the first play host one time"
This commit is contained in:
commit
58a9f7b62f
@ -44,7 +44,7 @@
|
|||||||
|
|
||||||
- import_tasks: db_setup.yml
|
- import_tasks: db_setup.yml
|
||||||
when:
|
when:
|
||||||
- inventory_hostname == groups['octavia_all'][0]
|
- _octavia_is_first_play_host
|
||||||
vars:
|
vars:
|
||||||
_oslodb_setup_host: "{{ octavia_db_setup_host }}"
|
_oslodb_setup_host: "{{ octavia_db_setup_host }}"
|
||||||
_oslodb_ansible_python_interpreter: "{{ octavia_db_setup_python_interpreter }}"
|
_oslodb_ansible_python_interpreter: "{{ octavia_db_setup_python_interpreter }}"
|
||||||
@ -61,7 +61,7 @@
|
|||||||
|
|
||||||
- import_tasks: mq_setup.yml
|
- import_tasks: mq_setup.yml
|
||||||
when:
|
when:
|
||||||
- inventory_hostname == groups['octavia_all'][0]
|
- _octavia_is_first_play_host
|
||||||
vars:
|
vars:
|
||||||
_oslomsg_rpc_setup_host: "{{ octavia_oslomsg_rpc_setup_host }}"
|
_oslomsg_rpc_setup_host: "{{ octavia_oslomsg_rpc_setup_host }}"
|
||||||
_oslomsg_rpc_userid: "{{ octavia_oslomsg_rpc_userid }}"
|
_oslomsg_rpc_userid: "{{ octavia_oslomsg_rpc_userid }}"
|
||||||
@ -161,7 +161,7 @@
|
|||||||
- name: "{{ octavia_service_name }}"
|
- name: "{{ octavia_service_name }}"
|
||||||
type: "{{ octavia_service_type }}"
|
type: "{{ octavia_service_type }}"
|
||||||
description: "{{ octavia_service_description }}"
|
description: "{{ octavia_service_description }}"
|
||||||
when: inventory_hostname == groups['octavia_all'][0]
|
when: _octavia_is_first_play_host
|
||||||
tags:
|
tags:
|
||||||
- octavia-install
|
- octavia-install
|
||||||
|
|
||||||
@ -192,7 +192,7 @@
|
|||||||
|
|
||||||
- import_tasks: octavia_db_sync.yml
|
- import_tasks: octavia_db_sync.yml
|
||||||
when:
|
when:
|
||||||
- inventory_hostname == groups['octavia_all'][0]
|
- _octavia_is_first_play_host
|
||||||
tags:
|
tags:
|
||||||
- octavia-install
|
- octavia-install
|
||||||
|
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
_octavia_is_first_play_host: "{{ (octavia_services['octavia-api']['group'] in group_names and inventory_hostname == (groups[octavia_services['octavia-api']['group']] | intersect(ansible_play_hosts)) | first) | bool }}"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Compile a list of the services on a host based on whether
|
# Compile a list of the services on a host based on whether
|
||||||
# the host is in the host group and the service is enabled.
|
# the host is in the host group and the service is enabled.
|
||||||
|
Loading…
Reference in New Issue
Block a user