Getting started

Example inventory

To configure iSCSI Targets on a particular host, you need to add it to the [debops_tgt] host group in Ansible inventory:


By default no targets are configured. You should create either files, disk partitions or LVM volumes and then configure them using tgt_targets list variable. See tgt_targets for more details.

Example playbook

Here's an example playbook which uses debops.tgt role:


- name: Manage iSCSI Target service
  hosts: [ 'debops_service_tgt', 'debops_tgt' ]
  become: True

  environment: '{{ inventory__environment | d({})
                   | combine(inventory__group_environment | d({}))
                   | combine(inventory__host_environment  | d({})) }}'


    - role: debops.tgt
      tags: [ 'role::tgt', 'skip::tgt' ]