From 2b19dfdaae46fcbe439f0cecb0242c209c795c8c Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Tue, 2 Mar 2021 09:51:26 +0100 Subject: [PATCH] dashboard: support igw nodes with dedicated subnet This adds the possibility to deploy the dashboard with igw nodes using a dedicated subnet. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1926170 Signed-off-by: Guillaume Abrioux (cherry picked from commit c33de174f1d8ec2d4b94a4322cdcdcf25262f1f6) --- group_vars/all.yml.sample | 2 ++ group_vars/rhcs.yml.sample | 2 ++ roles/ceph-dashboard/tasks/configure_dashboard.yml | 4 ++-- roles/ceph-defaults/defaults/main.yml | 2 ++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/group_vars/all.yml.sample b/group_vars/all.yml.sample index 47caa9925..d4d28a079 100644 --- a/group_vars/all.yml.sample +++ b/group_vars/all.yml.sample @@ -721,6 +721,8 @@ dummy: #alertmanager_port: 9093 #alertmanager_cluster_port: 9094 #alertmanager_conf_overrides: {} +# igw +#igw_network: "{{ public_network }}" ################################## diff --git a/group_vars/rhcs.yml.sample b/group_vars/rhcs.yml.sample index 91af605ec..d39529240 100644 --- a/group_vars/rhcs.yml.sample +++ b/group_vars/rhcs.yml.sample @@ -721,6 +721,8 @@ alertmanager_container_image: registry.redhat.io/openshift4/ose-prometheus-alert #alertmanager_port: 9093 #alertmanager_cluster_port: 9094 #alertmanager_conf_overrides: {} +# igw +#igw_network: "{{ public_network }}" ################################## diff --git a/roles/ceph-dashboard/tasks/configure_dashboard.yml b/roles/ceph-dashboard/tasks/configure_dashboard.yml index b3fe0ae0d..ac5c934cd 100644 --- a/roles/ceph-dashboard/tasks/configure_dashboard.yml +++ b/roles/ceph-dashboard/tasks/configure_dashboard.yml @@ -281,7 +281,7 @@ - name: add iscsi gateways - ipv4 command: "{{ ceph_cmd }} --cluster {{ cluster }} dashboard iscsi-gateway-add -i -" args: - stdin: "{{ 'https' if hostvars[item]['api_secure'] | default(false) | bool else 'http' }}://{{ hostvars[item]['api_user'] | default('admin') }}:{{ hostvars[item]['api_password'] | default('admin') }}@{{ hostvars[item]['ansible_facts']['all_ipv4_addresses'] | ips_in_ranges(public_network.split(',')) | first }}:{{ hostvars[item]['api_port'] | default(5000) }}" + stdin: "{{ 'https' if hostvars[item]['api_secure'] | default(false) | bool else 'http' }}://{{ hostvars[item]['api_user'] | default('admin') }}:{{ hostvars[item]['api_password'] | default('admin') }}@{{ hostvars[item]['ansible_facts']['all_ipv4_addresses'] | ips_in_ranges(igw_network.split(',')) | first }}:{{ hostvars[item]['api_port'] | default(5000) }}" stdin_add_newline: no changed_when: false delegate_to: "{{ groups[mon_group_name][0] }}" @@ -291,7 +291,7 @@ - name: add iscsi gateways - ipv6 command: "{{ ceph_cmd }} --cluster {{ cluster }} dashboard iscsi-gateway-add -i -" args: - stdin: "{{ 'https' if hostvars[item]['api_secure'] | default(false) | bool else 'http' }}://{{ hostvars[item]['api_user'] | default('admin') }}:{{ hostvars[item]['api_password'] | default('admin') }}@{{ hostvars[item]['ansible_facts']['all_ipv6_addresses'] | ips_in_ranges(public_network.split(',')) | last | ipwrap }}:{{ hostvars[item]['api_port'] | default(5000) }}" + stdin: "{{ 'https' if hostvars[item]['api_secure'] | default(false) | bool else 'http' }}://{{ hostvars[item]['api_user'] | default('admin') }}:{{ hostvars[item]['api_password'] | default('admin') }}@{{ hostvars[item]['ansible_facts']['all_ipv6_addresses'] | ips_in_ranges(igw_network.split(',')) | last | ipwrap }}:{{ hostvars[item]['api_port'] | default(5000) }}" stdin_add_newline: no changed_when: false delegate_to: "{{ groups[mon_group_name][0] }}" diff --git a/roles/ceph-defaults/defaults/main.yml b/roles/ceph-defaults/defaults/main.yml index c0f0b0035..6c8a25054 100644 --- a/roles/ceph-defaults/defaults/main.yml +++ b/roles/ceph-defaults/defaults/main.yml @@ -713,6 +713,8 @@ alertmanager_conf_dir: /etc/alertmanager alertmanager_port: 9093 alertmanager_cluster_port: 9094 alertmanager_conf_overrides: {} +# igw +igw_network: "{{ public_network }}" ##################################