From e23fc4121efdbeff263a6c316198288af07c3db3 Mon Sep 17 00:00:00 2001 From: Asaf Rachmani Date: Mon, 31 May 2021 09:19:34 +0300 Subject: [PATCH] roles: hosted_engine_setup: Remove leftover code and omit parameters * Remove leftover code * Omit username and password parameters for iscsi discovery Bug-Url: https://bugzilla.redhat.com/1922748 Signed-off-by: Asaf Rachmani --- .../hosted_engine_setup-remove-leftovers-code.yml | 3 +++ roles/hosted_engine_setup/tasks/iscsi_discover.yml | 13 ++----------- 2 files changed, 5 insertions(+), 11 deletions(-) create mode 100644 changelogs/fragments/hosted_engine_setup-remove-leftovers-code.yml diff --git a/changelogs/fragments/hosted_engine_setup-remove-leftovers-code.yml b/changelogs/fragments/hosted_engine_setup-remove-leftovers-code.yml new file mode 100644 index 00000000..e8ddd25d --- /dev/null +++ b/changelogs/fragments/hosted_engine_setup-remove-leftovers-code.yml @@ -0,0 +1,3 @@ +--- +minor_changes: + - hosted_engine_setup - Remove leftover code and omit parameters (https://github.com/oVirt/ovirt-ansible-collection/pull/281). diff --git a/roles/hosted_engine_setup/tasks/iscsi_discover.yml b/roles/hosted_engine_setup/tasks/iscsi_discover.yml index dc0c8b58..1363d3be 100644 --- a/roles/hosted_engine_setup/tasks/iscsi_discover.yml +++ b/roles/hosted_engine_setup/tasks/iscsi_discover.yml @@ -1,14 +1,5 @@ --- - include_tasks: auth_sso.yml -- name: Prepare iSCSI parameters - set_fact: - iscsid: - iscsi: - address: "{{ he_iscsi_portal_addr }}" - port: "{{ he_iscsi_portal_port }}" - username: "{{ he_iscsi_discover_username }}" - password: "{{ he_iscsi_discover_password }}" - no_log: true - name: Fetch host facts ovirt_host_info: pattern: name={{ he_host_name }} @@ -25,8 +16,8 @@ iscsi: address: "{{ he_iscsi_portal_addr }}" port: "{{ he_iscsi_portal_port }}" - username: "{{ he_iscsi_discover_username }}" - password: "{{ he_iscsi_discover_password }}" + username: "{{ he_iscsi_discover_username | default(omit) }}" + password: "{{ he_iscsi_discover_password | default(omit) }}" register: otopi_iscsi_targets # TODO: perform an iSCSI logout when viable, see: # https://bugzilla.redhat.com/show_bug.cgi?id=1535951