define download option for streamdeck icons

This commit is contained in:
L3D 2022-02-23 23:43:12 +01:00
parent dbcd157bad
commit 95af4c879c
Signed by: l3d
GPG key ID: CD08445BFF4313D1
4 changed files with 37 additions and 0 deletions

View file

@ -1,3 +1,11 @@
--- ---
win_streamdeck__packages: win_streamdeck__packages:
- streamdeck - streamdeck
win_streamdeck__download_icons: false
win_streamdeck__icons: []
# - src: https://example.com/foo.png'
# file: foo.png
win_streamdeck__dirs: []
# - 'folder_1'
win_streamdeck__root: 'C:\obs\'

15
tasks/directory.yml Normal file
View file

@ -0,0 +1,15 @@
---
- name: create folder for obs szene
ansible.windows.win_file:
path: '{{ item }}'
state: directory
with_items:
- '{{ win_streamdeck__root }}'
- '{{ win_streamdeck__root }}\streamdeck'
- name: create additional dirs
ansible.windows.win_file:
path: '{{ win_streamdeck__root }}\streamdeck\{{ item }}'
state: directory
with_items: '{{ win_streamdeck__dirs }}'
when: win_streamdeck__dirs | length>0

6
tasks/files.yml Normal file
View file

@ -0,0 +1,6 @@
---
- name: download defined files
ansible.windows.win_get_url:
url: '{{ item.src }}'
dest: '{{ win_streamdeck__root }}\streamdeck\{{ item.file }}'
with_items: '{{ win_streamdeck__icons }}'

View file

@ -1,3 +1,11 @@
--- ---
- name: install some streamdeck specific packages - name: install some streamdeck specific packages
ansible.builtin.include_tasks: packages.yml ansible.builtin.include_tasks: packages.yml
- name: create icons directory
ansible.builtin.include_tasks: directory.yml
when: win_streamdeck__download_icons | bool
- name: download defined icons
ansible.builtin.include_tasks: files.yml
when: win_streamdeck__download_icons | bool