From cfd271519bd66571571810e58fd314684a11ab44 Mon Sep 17 00:00:00 2001 From: sandrine sancho Date: Tue, 7 May 2024 11:21:42 +0200 Subject: [PATCH 1/2] Add condition to install plugins --- tasks/plugins.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tasks/plugins.yml b/tasks/plugins.yml index 30e7f0ba..c3ebe075 100644 --- a/tasks/plugins.yml +++ b/tasks/plugins.yml @@ -75,7 +75,9 @@ url: "http://{{ jenkins_hostname }}:{{ jenkins_http_port }}{{ jenkins_url_prefix }}" with_dependencies: "{{ jenkins_plugins_install_dependencies }}" with_items: "{{ jenkins_plugins }}" - when: jenkins_admin_password | default(false) + when: + - jenkins_admin_password | default(false) + - item != '' notify: restart jenkins tags: ['skip_ansible_lint'] register: plugin_result From 5ee37f7b9ccb96bb0b04f09f0122c2701d03584b Mon Sep 17 00:00:00 2001 From: sandrine sancho Date: Tue, 7 May 2024 11:23:00 +0200 Subject: [PATCH 2/2] Force download list plugins update --- tasks/plugins.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/tasks/plugins.yml b/tasks/plugins.yml index c3ebe075..f18216d5 100644 --- a/tasks/plugins.yml +++ b/tasks/plugins.yml @@ -32,6 +32,7 @@ get_url: url: "{{ jenkins_updates_url }}/update-center.json?id=default&version={{ _jenkins_cmd_version.stdout }}" dest: "{{ jenkins_home }}/updates/default.json" + force: true owner: jenkins group: jenkins mode: 0440