Skip to content

Commit 7bbf8c9

Browse files
feat: add support to change default owner and group when calling jenkins_plugin module (#15)
* feat: add support to change default owner and group when calling jenkins_plugin module. This adds support to use the role with Jenkins running on a docker container * docs: missing end . --------- Co-authored-by: Tobias Richter <tobias.richter@diva-e.com>
1 parent cb833c6 commit 7bbf8c9

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

README.md

+8
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,14 @@ The update center proxy no proxy hosts list.
120120
Controls if the initial setup of the jenkins instance should be completed.
121121
This may be necessary in proxy environments where the jenkins instance still thinks it is in offline mode.
122122

123+
jenkins_plugins_owner: "jenkins"
124+
125+
User owning the files in the plugins folder.
126+
127+
jenkins_plugins_group: "jenkins"
128+
129+
Group owning the files in the plugins folder.
130+
123131
## Dependencies
124132

125133
This role depends on the

defaults/main.yml

+6
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,9 @@ jenkins_plugins_proxy_no_proxy_hosts: []
7575
# Controls if the initial setup of the jenkins instance should be completed.
7676
# This may be necessary in proxy environments where the jenkins instance still thinks it is in offline mode
7777
jenkins_plugins_complete_initial_setup: false
78+
79+
# Owner of the files in the jenkins plugins folder
80+
jenkins_plugins_owner: "jenkins"
81+
82+
# Group of the files in the jenkins plugin folder
83+
jenkins_plugins_group: "{{ jenkins_plugins_owner }}"

tasks/main.yml

+2
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@
8888
updates_url: "{{ jenkins_plugins_download_base_url }}"
8989
updates_expiration: "{{ jenkins_plugins_updates_expiration }}"
9090
url: "{{ jenkins_plugins_jenkins_base_url }}"
91+
owner: "{{ jenkins_plugins_owner }}"
92+
group: "{{ jenkins_plugins_group }}"
9193
with_dict: "{{ jenkins_plugins_install_plugins | default({}) }}"
9294
changed_when: jenkins_plugins_install_plugins | default({}) | length > 0
9395
notify:

0 commit comments

Comments
 (0)