aboutsummaryrefslogtreecommitdiffhomepage
path: root/tasks/rundeck.yml
diff options
context:
space:
mode:
authorGaƫtan <36162164+gaetanfl@users.noreply.github.com>2021-11-15 16:21:03 +0100
committerGitHub <noreply@github.com>2021-11-15 16:21:03 +0100
commitda255318b779446d7afd4784169374ce56d07c8c (patch)
treeb7218451255dd98ef7ac1bea70358a19404741a2 /tasks/rundeck.yml
parent0f0259c91faa37ec6c7e7d89cc47f41ca065a244 (diff)
parent95a202dcbd62d616698aedc7f993f91910b2187d (diff)
downloadansible-rundeck-jobs-da255318b779446d7afd4784169374ce56d07c8c.tar.gz
ansible-rundeck-jobs-da255318b779446d7afd4784169374ce56d07c8c.tar.zst
ansible-rundeck-jobs-da255318b779446d7afd4784169374ce56d07c8c.zip
Merge pull request #12 from gaetanfl/unmask_job_creation_errors
Unmask Job creation error
Diffstat (limited to 'tasks/rundeck.yml')
-rw-r--r--tasks/rundeck.yml12
1 files changed, 12 insertions, 0 deletions
diff --git a/tasks/rundeck.yml b/tasks/rundeck.yml
index 007b86e..1250d24 100644
--- a/tasks/rundeck.yml
+++ b/tasks/rundeck.yml
@@ -19,6 +19,18 @@
19 register: rundeck_create_jobs 19 register: rundeck_create_jobs
20 with_items: "{{ rundeck_jobs_files.files}}" 20 with_items: "{{ rundeck_jobs_files.files}}"
21 21
22- name: Check if a job failed
23 fail:
24 msg: "Job defined in {{ file }} has failed with message: {{ message }}"
25 with_items: "{{ rundeck_create_jobs.results }}"
26 loop_control:
27 label: "{{ item.item.path }}"
28 vars:
29 file: "{{ item.item.path }}"
30 message: "{{ item.json.failed }}"
31 when: item.json.failed|length > 0
32 ignore_errors: "{{ rundeck_ignore_creation_error }}"
33
22- name: Get all jobs 34- name: Get all jobs
23 uri: 35 uri:
24 url: "{{rundeck_api_url }}/{{rundeck_api_version}}/project/{{ rundeck_project }}/jobs?groupPathExact={{ rundeck_jobs_group | default(rundeck_empty_group_path) }}" 36 url: "{{rundeck_api_url }}/{{rundeck_api_version}}/project/{{ rundeck_project }}/jobs?groupPathExact={{ rundeck_jobs_group | default(rundeck_empty_group_path) }}"