From d4475a431640e8db9dff41e2b3cc8a9d58ce5b39 Mon Sep 17 00:00:00 2001 From: Chris Sewell Date: Fri, 16 Apr 2021 15:38:53 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=8C=20IMPROVE:=20Allow=20for=20example?= =?UTF-8?q?=20folder=20tasks=20to=20be=20skipped=20(#8)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Skipped if `qm_customizations_examples_folder` is set to "" or null --- tasks/folders.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tasks/folders.yml b/tasks/folders.yml index 2985b60..40b6f2d 100644 --- a/tasks/folders.yml +++ b/tasks/folders.yml @@ -12,6 +12,7 @@ mode: 0755 - name: Create folder for examples + when: qm_customizations_examples_folder is truthy become: true become_user: "{{ qm_customizations_vm_user }}" file: @@ -19,17 +20,18 @@ state: directory - name: clean compiled python files + when: qm_customizations_examples_folder is truthy and clean is defined and clean become: true become_user: "{{ qm_customizations_vm_user }}" shell: find . -name "*.pyc" | xargs rm -f ignore_errors: true args: chdir: "{{ qm_customizations_examples_folder }}" - when: clean is defined and clean - name: Add readme for examples become: true become_user: "{{ qm_customizations_vm_user }}" + when: qm_customizations_examples_readme is truthy ini_file: path: "{{ qm_customizations_examples_readme }}" section: "General" @@ -50,10 +52,10 @@ when: not qm_customizations_headless - name: symlink examples to desktop + when: qm_customizations_examples_folder is truthy and not qm_customizations_headless become: true become_user: "{{ qm_customizations_vm_user }}" file: src: "{{ qm_customizations_examples_folder }}" dest: "${HOME}/Desktop/examples" state: link - when: not qm_customizations_headless