2023-01-10 07:42:13 +00:00
|
|
|
---
|
2024-02-18 20:09:43 +00:00
|
|
|
- name: Ensure iscsi is installed
|
|
|
|
ansible.builtin.package:
|
|
|
|
name: "{{ item }}"
|
|
|
|
state: present
|
|
|
|
loop:
|
|
|
|
- iscsi-initiator-utils
|
2023-01-10 07:42:13 +00:00
|
|
|
|
2024-02-18 20:09:43 +00:00
|
|
|
- name: Configure iscsi-initiator
|
|
|
|
ansible.builtin.copy:
|
|
|
|
content: "InitiatorName=$(/sbin/iscsi-iname)"
|
|
|
|
dest: /etc/iscsi/initiatorname.iscsi
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: "0644"
|
|
|
|
notify: __iscsid_restart
|
2023-01-10 07:42:13 +00:00
|
|
|
|
2024-02-18 20:09:43 +00:00
|
|
|
- name: Ensure iscsid service is up and running
|
|
|
|
ansible.builtin.service:
|
|
|
|
name: iscsid
|
|
|
|
daemon_reload: True
|
|
|
|
enabled: True
|
|
|
|
state: started
|