open_iscsi – Manage iSCSI targets with Open-iSCSI¶
Synopsis¶
- Discover targets on given portal, (dis)connect targets, mark targets to manually or auto start, return device nodes of connected targets.
Requirements¶
The below requirements are needed on the host that executes this module.
- open_iscsi library and tools (iscsiadm)
Parameters¶
Examples¶
- name: Perform a discovery on 10.1.2.3 and show available target nodes
open_iscsi:
show_nodes: yes
discover: yes
portal: 10.1.2.3
# NOTE: Only works if exactly one target is exported to the initiator
- name: Discover targets on portal and login to the one available
open_iscsi:
portal: '{{ iscsi_target }}'
login: yes
discover: yes
- name: Connect to the named target, after updating the local persistent database (cache)
open_iscsi:
login: yes
target: iqn.1986-03.com.sun:02:f8c1f9e0-c3ec-ec84-c9c9-8bfb0cd5de3d
- name: Disconnect from the cached named target
open_iscsi:
login: no
target: iqn.1986-03.com.sun:02:f8c1f9e0-c3ec-ec84-c9c9-8bfb0cd5de3d
Status¶
- This module is not guaranteed to have a backwards compatible interface. [preview]
- This module is maintained by the Ansible Community. [community]
Authors¶
- Serge van Ginderachter (@srvg)
Hint
If you notice any issues in this documentation, you can edit this document to improve it.