diff --git a/libvirthost.yml b/libvirthost.yml index db93ed0..2600cdc 100644 --- a/libvirthost.yml +++ b/libvirthost.yml @@ -4,3 +4,4 @@ - common - crypto - libvirthost + - iscsitarget diff --git a/roles/iscsitarget/files/etc/tgt/conf.d/forge_iscsi.conf b/roles/iscsitarget/files/etc/tgt/conf.d/forge_iscsi.conf new file mode 100644 index 0000000..dfc9250 --- /dev/null +++ b/roles/iscsitarget/files/etc/tgt/conf.d/forge_iscsi.conf @@ -0,0 +1,6 @@ + + backing-store /dev/haze/forge + incominguser rift-in raij8IevMoh8Uiha + outgoinguser haze-out Shahpie5iuNg3oor + + diff --git a/roles/iscsitarget/tasks/main.yml b/roles/iscsitarget/tasks/main.yml new file mode 100644 index 0000000..b66acb6 --- /dev/null +++ b/roles/iscsitarget/tasks/main.yml @@ -0,0 +1,27 @@ +--- +- name: install packages + apt: + state: latest + pkg: + - tgt + install_recommends: no + force_apt_get: yes + become: yes + +- name: copy config files, scripts and services + copy: + src: "{{ item }}" + dest: "/{{ item }}" + force: yes + mode: preserve + become: yes + with_items: + - etc/tgt/conf.d/forge_iscsi.conf + +- name: enable and restart service + systemd: + name: tgt + state: restarted + enabled: yes + become: yes +