From 88141db15020bfa52aa8f6799c91f2786954459d Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Thu, 31 Oct 2013 16:52:29 +0000 Subject: [PATCH] Add other netapp iscsi for buildvmhosts only. --- inventory/host_vars/buildvmhost-10.phx2.fedoraproject.org | 4 ++-- roles/iscsi_client/tasks/main.yml | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/inventory/host_vars/buildvmhost-10.phx2.fedoraproject.org b/inventory/host_vars/buildvmhost-10.phx2.fedoraproject.org index e904e0b9ec..9ad754d39d 100644 --- a/inventory/host_vars/buildvmhost-10.phx2.fedoraproject.org +++ b/inventory/host_vars/buildvmhost-10.phx2.fedoraproject.org @@ -1,5 +1,5 @@ --- # iscsi initiator for netapp iscsi volume -netapp_iscsi_name: iqn.1992-08.com.netapp:sn.1573980325:vf.6fb258f4-106f-11e2-ae29-00a098161d90 +netapp_nfs01_iscsi_name: iqn.1992-08.com.netapp:sn.1573980325:vf.f88732f4-106e-11e2-bc86-00a098162a28 # iscsi portal for netapp iscsi volume -netapp_iscsi_portal: 10.5.88.36 +netapp_nfs01_iscsi_portal: 10.5.88.36 diff --git a/roles/iscsi_client/tasks/main.yml b/roles/iscsi_client/tasks/main.yml index 902f62da6f..7498f73abc 100644 --- a/roles/iscsi_client/tasks/main.yml +++ b/roles/iscsi_client/tasks/main.yml @@ -32,8 +32,13 @@ tags: - config -- name: run iscsiadm command for initial connect +- name: run iscsiadm command for initial connect to vtap-fedora-iscsi01 command: creates=/var/lib/iscsi/nodes/{{ netapp_iscsi_name }}/{{ netapp_iscsi_portal }},3260 /sbin/iscsiadm --mode node --targetname --portal {{ netapp_iscsi_portal }} -o new ; /sbin/iscsiadm --mode node --targetname {{ netapp_iscsi_name }} --portal {{ netapp_iscsi_portal }} --login tags: - config +- name: run iscsiadm command for initial connect to vtap-fedora-nfs01 + command: creates=/var/lib/iscsi/nodes/{{ netapp_nfs01_iscsi_name }}/{{ netapp_nfs01_iscsi_portal }},3260 /sbin/iscsiadm --mode node --targetname --portal {{ netapp_nfs01_iscsi_portal }} -o new ; /sbin/iscsiadm --mode node --targetname {{ netapp_nfs01_iscsi_name }} --portal {{ netapp_nfs01_iscsi_portal }} --login + tags: + - config + only_if: "'${inventory_hostname}'.startswith('buildvmhost')"