Skip to content

OndrejHome/ansible.iscsiadm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

iscsiadm

Role for installing and setting up iscsiadm iSCSI initiator.

Requirements

Working iSCSI target (server). This role is only configuring the initiator (client).

Role Variables

  • (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'
    

Example Playbook

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'}

Note for SUSE Linux Enterprise Server 15.x / openSUSE Leap 15.x

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

License

GPLv3

Author Information

To get in touch with author you can use email ondrej-xa2iel8u@famera.cz or create a issue on github when requesting some feature.

About

Ansible iscsiadm role

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages