Add conditionals to tmodloader download logic

This commit is contained in:
Salt 2023-02-21 21:30:33 -06:00
parent b9e1be0f8a
commit e0d6244aae

View File

@ -23,6 +23,7 @@
chdir: "{{ tmodloader_data_prefix }}/data/ModLoader/Mods" chdir: "{{ tmodloader_data_prefix }}/data/ModLoader/Mods"
creates: "{{ tmodloader_data_prefix }}/data/ModLoader/Mods/{{ item }}.tmod" creates: "{{ tmodloader_data_prefix }}/data/ModLoader/Mods/{{ item }}.tmod"
with_list: "{{ tmodloader_mods }}" with_list: "{{ tmodloader_mods }}"
when: "{{ tmodloader_mods }}"
notify: "restart tmodloader {{ tmodloader_name }}" notify: "restart tmodloader {{ tmodloader_name }}"
- name: enable mods - name: enable mods
ansible.builtin.template: ansible.builtin.template:
@ -31,6 +32,7 @@
owner: "{{ tmodloader_uid }}" owner: "{{ tmodloader_uid }}"
group: "{{ tmodloader_gid }}" group: "{{ tmodloader_gid }}"
mode: "0750" mode: "0750"
when: "{{ tmodloader_mods }}"
notify: "restart tmodloader {{ tmodloader_name }}" notify: "restart tmodloader {{ tmodloader_name }}"
- name: assure tmodloader {{ tmodloader_name }} files - name: assure tmodloader {{ tmodloader_name }} files
ansible.builtin.file: ansible.builtin.file: