From c3e54982f17b9fdbc732617898227c3b9dd1727b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ga=C3=ABtan=20Duchaussois?= Date: Fri, 2 Nov 2018 11:35:30 +0100 Subject: [PATCH] Add group filtering for jobs cleaning --- README.md | 1 + tasks/rundeck.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 618efd9..71d4acc 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ Role Variables * `rundeck_api_token` the authentification token (mandatory). * `rundeck_api_version` api version supported by rundeck server. Default to 26. * `rundeck_remove_missing` Whether to delete jobs present in rundeck and not in file. Defaults to true. +* `rundeck_jobs_group` the group of job to check for removal Dependencies ------------ diff --git a/tasks/rundeck.yml b/tasks/rundeck.yml index 642abd6..0da33d0 100644 --- a/tasks/rundeck.yml +++ b/tasks/rundeck.yml @@ -21,7 +21,7 @@ - name: Get all jobs uri: - url: "{{rundeck_api_url }}/{{rundeck_api_version}}/project/{{ rundeck_project }}/jobs" + url: "{{rundeck_api_url }}/{{rundeck_api_version}}/project/{{ rundeck_project }}/jobs?groupPathExact={{ rundeck_jobs_group | default('""') }}" method: GET headers: Accept: application/json -- 2.41.0