Giter VIP home page Giter VIP logo

ansible-bsd-iscsi-initiator's Introduction

ansible-bsd-iscsi-initiator

This role mounts iSCSI remote targets and sets CARP-based failover mechanism.

Requirements

Mandatory:

  • Some iSCSI targets must be configured and available.

Optional:

  • A valid CARP attributes (VRRP ID, IP address, shared secret)

Role Variables

Default variables:

# By default, we do not monitorservices using consul
bsd_iscsi_initiator_config_consul: false 

# Path oh the consul configuration files
bsd_iscsi_initiator_consul_services_path: /usr/local//etc/consul.d

# Description of the services to monitor
bsd_iscsi_initiator_consul:
- service:
  name: "iscsid"
  tags: [ "iscsi", "initiator" ]
  checks:
  - args: [ "service", "iscsid", "status" ]
    interval: "60s"

Main variables to set:

bsd_iscsi_initiator:
  carp:
    secret:   # Shared secret between nodes
    ip_cidr:  # Floating IP CIDR
    iface:    # Network interface used
    vhid:     # VRRP IP
  luns:
  - name:     # LUN's nickname (used by iscsid)
    target:
      addr:   # Address of the target
      iqn:    # IQN of the target LUN

Dependencies

N.A.

Example Playbook

Mount two remote targets and install event-based zpool recovery scripts.

- hosts: initiators
  vars:
    bsd_iscsi_initiator:
      carp:
        secret: secret
        ip_cidr: 192.168.64.100/24
        iface: vtnet0
        vhid: 1
      luns:
      - name: t10data0
        target:
          addr: 192.168.64.10
          iqn: "iqn.2023-08.com.example:data0"
      - name: t11data0
        target:
          addr: 192.168.64.11
          iqn: "iqn.2023-08.com.example:data0"
  roles:
  - role: ansible-bsd-iscsi-initiator

Mount two remote targets, install event-based zpool recovery scripts and a CARP-based floating IP.

- hosts: initiators
  vars:
    bsd_iscsi_initiator:
      carp:
        secret: secret
        ip_cidr: 192.168.64.100/24
        iface: vtnet0
        vhid: 1
      luns:
      - name: t10data0
        target:
          addr: 192.168.64.10
          iqn: "iqn.2023-08.com.example:data0"
      - name: t11data0
        target:
          addr: 192.168.64.11
          iqn: "iqn.2023-08.com.example:data0"
  roles:
  - role: ansible-bsd-iscsi-initiator

Testing

Not implemented yet.

License

GPL-3+

Author Information

Mathieu GRZYBEK

ansible-bsd-iscsi-initiator's People

Contributors

mgrzybek avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.