diff options
author | Gaƫtan <36162164+gaetanfl@users.noreply.github.com> | 2021-11-25 14:30:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-25 14:30:57 +0100 |
commit | a0c255509b7709877626b6b86f41d6483d1a8d0a (patch) | |
tree | e47681f0cfae40b36551a797fb48e95a1755c431 /tasks | |
parent | 42bffebc57d913ed7a30f141f944f957c39b8c66 (diff) | |
parent | 7e22b2dd6f8d4483e7007fe1430ed335360251f6 (diff) | |
download | ansible-rundeck-jobs-a0c255509b7709877626b6b86f41d6483d1a8d0a.tar.gz ansible-rundeck-jobs-a0c255509b7709877626b6b86f41d6483d1a8d0a.tar.zst ansible-rundeck-jobs-a0c255509b7709877626b6b86f41d6483d1a8d0a.zip |
Merge pull request #16 from gaetanfl/fix_lint
Fix linting errors
Diffstat (limited to 'tasks')
-rw-r--r-- | tasks/rundeck.yml | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tasks/rundeck.yml b/tasks/rundeck.yml index 1250d24..aa71570 100644 --- a/tasks/rundeck.yml +++ b/tasks/rundeck.yml | |||
@@ -7,7 +7,7 @@ | |||
7 | 7 | ||
8 | - name: Create rundeck jobs | 8 | - name: Create rundeck jobs |
9 | uri: | 9 | uri: |
10 | url: "{{rundeck_api_url }}/{{rundeck_api_version}}/project/{{ rundeck_project }}/jobs/import" | 10 | url: "{{ rundeck_api_url }}/{{ rundeck_api_version }}/project/{{ rundeck_project }}/jobs/import" |
11 | method: POST | 11 | method: POST |
12 | return_content: true | 12 | return_content: true |
13 | body_format: raw | 13 | body_format: raw |
@@ -17,7 +17,7 @@ | |||
17 | Content-Type: application/x-www-form-urlencoded; charset=utf-8 | 17 | Content-Type: application/x-www-form-urlencoded; charset=utf-8 |
18 | X-Rundeck-Auth-Token: "{{ rundeck_api_token }}" | 18 | X-Rundeck-Auth-Token: "{{ rundeck_api_token }}" |
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 | 22 | - name: Check if a job failed |
23 | fail: | 23 | fail: |
@@ -33,13 +33,14 @@ | |||
33 | 33 | ||
34 | - name: Get all jobs | 34 | - name: Get all jobs |
35 | uri: | 35 | uri: |
36 | 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_group_path }}" |
37 | method: GET | 37 | method: GET |
38 | headers: | 38 | headers: |
39 | Accept: application/json | 39 | Accept: application/json |
40 | X-Rundeck-Auth-Token: "{{ rundeck_api_token }}" | 40 | X-Rundeck-Auth-Token: "{{ rundeck_api_token }}" |
41 | vars: | 41 | vars: |
42 | rundeck_empty_group_path: '' | 42 | rundeck_empty_group_path: '' |
43 | rundeck_group_path: "{{ rundeck_jobs_group | default(rundeck_empty_group_path) }}" | ||
43 | register: rundeck_existing_jobs | 44 | register: rundeck_existing_jobs |
44 | when: rundeck_remove_missing | 45 | when: rundeck_remove_missing |
45 | 46 | ||
@@ -54,7 +55,7 @@ | |||
54 | 55 | ||
55 | - name: "Remove jobs not in the directory" | 56 | - name: "Remove jobs not in the directory" |
56 | uri: | 57 | uri: |
57 | url: "{{rundeck_api_url }}/{{rundeck_api_version}}/job/{{ item }}" | 58 | url: "{{ rundeck_api_url }}/{{ rundeck_api_version }}/job/{{ item }}" |
58 | method: DELETE | 59 | method: DELETE |
59 | headers: | 60 | headers: |
60 | Accept: application/json | 61 | Accept: application/json |