galaxy_info:
- author: FretLink
- description: Love and Truck
- company: FretLink
+ author: fretlink
+ role_name: rundeck_jobs
+ description: "Love and Truck"
+ company: Fretlink
# If the issue tracker for your role is not on github, uncomment the
# next line and provide a value
# - GPLv3
# - Apache
# - CC-BY
- license: TBD
+ license: BSD
min_ansible_version: 2.5
# this branch. If Travis integration is configured, only notifications for this
# branch will be accepted. Otherwise, in all cases, the repo's default branch
# (usually master) will be used.
- #github_branch:
+ # github_branch:
#
# platforms is a list of platforms, and each platform has a name and a list of versions.
#
- # platforms:
- # - name: Fedora
- # versions:
- # - all
+ platforms:
+ - name: Fedora
+ versions:
+ - all
+ - name: Debian
+ versions:
+ - all
+ - name: Ubuntu
+ versions:
+ - all
# - 25
# - name: SomePlatform
# versions:
# - 99.99
galaxy_tags: []
- # List tags for your role here, one per line. A tag is a keyword that describes
- # and categorizes the role. Users find roles by searching for tags. Be sure to
- # remove the '[]' above, if you add tags to this list.
- #
- # NOTE: A tag is limited to a single word comprised of alphanumeric characters.
- # Maximum 20 tags per role.
+ # List tags for your role here, one per line. A tag is a keyword that describes
+ # and categorizes the role. Users find roles by searching for tags. Be sure to
+ # remove the '[]' above, if you add tags to this list.
+ #
+ # NOTE: A tag is limited to a single word comprised of alphanumeric characters.
+ # Maximum 20 tags per role.
dependencies: []
- # List your role dependencies here, one per line. Be sure to remove the '[]' above,
- # if you add dependencies to this list.
+# List your role dependencies here, one per line. Be sure to remove the '[]' above,
+# if you add dependencies to this list.
- name: Create rundeck jobs
uri:
- url: "{{rundeck_api_url }}/{{rundeck_api_version}}/project/{{ rundeck_project }}/jobs/import"
+ url: "{{ rundeck_api_url }}/{{ rundeck_api_version }}/project/{{ rundeck_project }}/jobs/import"
method: POST
return_content: true
body_format: raw
Content-Type: application/x-www-form-urlencoded; charset=utf-8
X-Rundeck-Auth-Token: "{{ rundeck_api_token }}"
register: rundeck_create_jobs
- with_items: "{{ rundeck_jobs_files.files}}"
+ with_items: "{{ rundeck_jobs_files.files }}"
- name: Check if a job failed
fail:
- name: Get all jobs
uri:
- url: "{{rundeck_api_url }}/{{rundeck_api_version}}/project/{{ rundeck_project }}/jobs?groupPathExact={{ rundeck_jobs_group | default(rundeck_empty_group_path) }}"
+ url: "{{ rundeck_api_url }}/{{ rundeck_api_version }}/project/{{ rundeck_project }}/jobs?groupPathExact={{ rundeck_group_path }}"
method: GET
headers:
Accept: application/json
X-Rundeck-Auth-Token: "{{ rundeck_api_token }}"
vars:
rundeck_empty_group_path: ''
+ rundeck_group_path: "{{ rundeck_jobs_group | default(rundeck_empty_group_path) }}"
register: rundeck_existing_jobs
when: rundeck_remove_missing
- name: "Remove jobs not in the directory"
uri:
- url: "{{rundeck_api_url }}/{{rundeck_api_version}}/job/{{ item }}"
+ url: "{{ rundeck_api_url }}/{{ rundeck_api_version }}/job/{{ item }}"
method: DELETE
headers:
Accept: application/json
- role: ../../ansible-rundeck-jobs
rundeck_api_url: http://localhost:4440/api
rundeck_project: test
- rundeck_api_token: testtoken
- rundeck_jobs_path: rundeck_files
+ rundeck_api_token: testtoken
+ rundeck_jobs_path: rundeck_files