ansible-legacy/roles/iscsitarget/tasks/main.yml

28 lines
457 B
YAML

---
- 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