---
# tasks file for ansible/arch_iscsi
# Sync and update Pacman
- name: Perform a discovery on freenas.dnet and show available target nodes
  community.general.open_iscsi:
    show_nodes: yes
    discover: yes
    portal: freenas.dnet
  become: yes
- name: Enable automatic login for freenas.dnet
  community.general.open_iscsi:
    login: yes
    portal: freenas.dnet
    auto_portal_startup: yes
    target: iqn.2022-02.freenas.dnet:framework-backup
  become: yes
- name: Ensure iscsi service started
  ansible.builtin.systemd:
    name: iscsi
    state: started
    enabled: yes
  become: yes
- name: Ensure iscsid service started
  ansible.builtin.systemd:
    name: iscsid
    state: started
    enabled: yes
  become: yes
