Skip to content

Commit

Permalink
implemented plugings
Browse files Browse the repository at this point in the history
  • Loading branch information
zerwes committed Nov 14, 2024
1 parent 5aa5b39 commit 30cfd2d
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
10 changes: 10 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ rundeck_port_https: 4443

# base dir for config files
rundeck_etc: /etc/rundeck
# base dir
rundeck_base: /var/lib/rundeck

# target /etc/default/rundeckd read by /etc/rundeck/profile
rundeck_default:
Expand Down Expand Up @@ -62,3 +64,11 @@ rundeck_users: {}
# roles: user,admin,architect,deploy,build
# admin:
# state: absent

# rundeck_plugins
rundeck_plugins: {}
# see https://github.com/rundeck-plugins
# example:
# rundeck_plugins:
# "ansible-plugin.jar": "https://github.com/rundeck-plugins/ansible-plugin/releases/download/v4.0.5/ansible-plugin-4.0.5.jar"
# "another-plugin.zip": absent # remove plugin
19 changes: 19 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,22 @@
state: "{{ item.value.state | default('present') }}"
notify: rundeck service
with_dict: "{{ rundeck_users | default({}) }}"

- name: install plugins
ansible.builtin.get_url:
url: "{{ item.value }}"
dest: "{{ rundeck_base }}/libext/{{ item.key }}"
mode: '0644'
owner: rundeck
group: rundeck
notify: rundeck service
with_dict: "{{ rundeck_plugins }}"
where: item.value != "absent"

- name: remove plugins
ansible.builtin.file:
path: "{{ rundeck_base }}/libext/{{ item.key }}"
state: absent
notify: rundeck service
with_dict: "{{ rundeck_plugins }}"
where: item.value == "absent"

0 comments on commit 30cfd2d

Please sign in to comment.