Skip to content

Commit

Permalink
install plugins conditionally
Browse files Browse the repository at this point in the history
  • Loading branch information
zhan9san committed Oct 26, 2024
1 parent dddf161 commit 4ec310d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jenkins_plugin_manager_url: "{{ jenkins_plugin_manager_url_prefix }}/{{ jenkins_
jenkins_tool_dir: /opt/jenkins_tool
jenkins_plugin_manager_path: "{{ jenkins_tool_dir }}/jenkins-plugin-manager.jar"

jenkins_plugin_file: plugins.txt
jenkins_plugin_file: ""
jenkins_plugin_file_path: "{{ jenkins_tool_dir }}/plugins.txt"

# For JCasc
Expand Down
1 change: 1 addition & 0 deletions molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
vars:
jdk_version: 21.0.2
java_home: /opt/jdk-21.0.2
jenkins_plugin_file: plugins.txt
jenkins_jcasc_template: jenkins.yaml.j2
jenkins_systemd_unit_envs:
java_home: "{{ java_home }}"
Expand Down
1 change: 1 addition & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
- name: Set up Plugin
ansible.builtin.include_tasks:
file: "setup-plugin.yml"
when: jenkins_plugin_file

- name: Set up JCasc
ansible.builtin.include_tasks:
Expand Down

0 comments on commit 4ec310d

Please sign in to comment.