Skip to content

Commit f685fba

Browse files
author
Nathan Pawelek
committed
Fix ternary logic for setting holland_venv_bin
1 parent e66cd5c commit f685fba

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

playbooks/maas-infra-galera.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
mode: "0644"
5252
delegate_to: "{{ physical_host | default(ansible_host) }}"
5353
when:
54-
- maas_holland_venv_enabled | bool
54+
- maas_holland_enabled
5555
notify:
5656
- Restart rax-maas
5757

playbooks/templates/rax-maas/holland_local_check.yaml.j2

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
{% set label = "holland_local_check" %}
22
{% set check_name = label+'--'+inventory_hostname %}
3-
{% if maas_holland_venv_enabled | bool %}
4-
{% set holland_venv_bin = (maas_holland_venv_enabled | bool) | ternary('/openstack/venvs/holland-{{ rpc_release }}/bin','/usr/local/bin') %}
5-
{% endif %}
3+
{% set holland_venv_bin = (maas_holland_venv_enabled | bool | ternary(maas_holland_venv_bin,'/usr/local/bin')) %}
64
type : agent.plugin
75
label : "{{ check_name }}"
86
period : "{{ maas_check_period_override[label] | default(maas_check_period) }}"

playbooks/vars/maas-infra.yml

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ elasticsearch_process_names:
1919
filebeat_process_names:
2020
- filebeat
2121

22+
maas_holland_venv_bin: "/openstack/venvs/holland-{{ rpc_release }}/bin"
2223
maas_mysql_connection_warning_threshold: 80
2324
maas_mysql_connection_critical_threshold: 90
2425
maas_mysql_access_denied_errors_rate_warning_threshold: 10

playbooks/vars/main.yml

+6
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,12 @@ maas_rpc_legacy_ceph: false
254254
#
255255
# maas_proxy_url: http://username:[email protected]:9000/
256256

257+
#
258+
# maas_holland_enabled: (Optional) Instruct rpc-maas to deploy holland check
259+
#
260+
#
261+
maas_holland_enabled: false
262+
257263
#
258264
# maas_holland_venv_enabled: Instruct rpc-maas that the holland executable is within a venv
259265
# in the galera containers (RPC-O newton and onward).

0 commit comments

Comments
 (0)