Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support to change default owner and group when calling jenkins_plugin module #15

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,14 @@ The update center proxy no proxy hosts list.
Controls if the initial setup of the jenkins instance should be completed.
This may be necessary in proxy environments where the jenkins instance still thinks it is in offline mode.

jenkins_plugins_owner: "jenkins"

User owning the files in the plugins folder.

jenkins_plugins_group: "jenkins"

Group owning the files in the plugins folder.

## Dependencies

This role depends on the
Expand Down
6 changes: 6 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,9 @@ jenkins_plugins_proxy_no_proxy_hosts: []
# Controls if the initial setup of the jenkins instance should be completed.
# This may be necessary in proxy environments where the jenkins instance still thinks it is in offline mode
jenkins_plugins_complete_initial_setup: false

# Owner of the files in the jenkins plugins folder
jenkins_plugins_owner: "jenkins"

# Group of the files in the jenkins plugin folder
jenkins_plugins_group: "{{ jenkins_plugins_owner }}"
2 changes: 2 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@
updates_url: "{{ jenkins_plugins_download_base_url }}"
updates_expiration: "{{ jenkins_plugins_updates_expiration }}"
url: "{{ jenkins_plugins_jenkins_base_url }}"
owner: "{{ jenkins_plugins_owner }}"
group: "{{ jenkins_plugins_group }}"
with_dict: "{{ jenkins_plugins_install_plugins | default({}) }}"
changed_when: jenkins_plugins_install_plugins | default({}) | length > 0
notify:
Expand Down