Role for installing and setting up iscsiadm iSCSI initiator.
Working iSCSI target (server). This role is only configuring the initiator (client).
-
(optional) iSCSI target IP/hostname agains which role will run discovery and login. If this is not specified the role will only install the utilities for initiator and detect initiator WWN generated by system that will be stored in
iscsi_initiator_name
variable for each system.iscsi_target_ip: '192.168.0.1'
-
(optional) iSCSI target tcp port (defaults to 3260)
iscsi_target_port: '3260'
-
(optional) custom_iscsi_initiator_name - use custom initiator name instead of system randomly generated one
custom_iscsi_initiator_name: 'iqn.1994-05.com.redhat:my_custom_initiator'
Without any variables passed this role just installs and enables iscsiadm tools on system.
- hosts: servers
roles:
- { role: 'ondrejhome.iscsiadm' }
Below example will install iscsiadm and instruct systems to discover and login into iSCSI target.
- hosts: servers
roles:
- { role: 'ondrejhome.iscsiadm', iscsi_target_ip: '192.168.0.1'}
Please note that SLES 15.x / openSUSE Leap 15.x only ship with python3 installed by default.
To avoid the ansible warning for the discovered python interpreter, add a line like the following to your inventory:
192.168.22.53 ansible_python_interpreter=/usr/bin/python3
GPLv3
To get in touch with author you can use email ondrej-xa2iel8u@famera.cz or create a issue on github when requesting some feature.