]> git.immae.eu Git - github/fretlink/ansible-rundeck-jobs.git/commitdiff
fix: too many double quotes got Ansible unhappy 🥴 4/head
authorPaul Bonaud <paul.bonaud@fretlink.com>
Mon, 12 Nov 2018 16:06:05 +0000 (17:06 +0100)
committerPaul Bonaud <paul.bonaud@fretlink.com>
Mon, 12 Nov 2018 16:06:05 +0000 (17:06 +0100)
Extracting the string literal `""` into an Ansible variable seems to
work fine.

tasks/rundeck.yml

index 0da33d0cdc372959a6bd6a8e8e1c5449a73b0f29..78529990ebdf1ee2902aa1a51c666bba107d3bda 100644 (file)
 
 - name: Get all jobs
   uri:
-    url: "{{rundeck_api_url }}/{{rundeck_api_version}}/project/{{ rundeck_project }}/jobs?groupPathExact={{ rundeck_jobs_group | default('""') }}"
+    url: "{{rundeck_api_url }}/{{rundeck_api_version}}/project/{{ rundeck_project }}/jobs?groupPathExact={{ rundeck_jobs_group | default(rundeck_empty_group_path) }}"
     method: GET
     headers:
       Accept: application/json
       X-Rundeck-Auth-Token: "{{ rundeck_api_token }}"
+  vars:
+    rundeck_empty_group_path: '""'
   register: rundeck_existing_jobs
   when: rundeck_remove_missing