Skip to content

Commit 0116f24

Browse files
Solve "Conditionals must have a boolean result." error message.
1 parent 546fb9b commit 0116f24

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tasks/setup-Debian.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
repo: "{{ jenkins_repo_url }}"
2020
state: present
2121
update_cache: true
22-
when: jenkins_repo_url | default(false)
22+
when: jenkins_repo_url is defined and jenkins_repo_url != ""
2323
tags: ['skip_ansible_lint']
2424

2525
- name: Download specific Jenkins version.

tasks/setup-RedHat.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
get_url:
1313
url: "{{ jenkins_repo_url }}"
1414
dest: /etc/yum.repos.d/jenkins.repo
15-
when: jenkins_repo_url | default(false)
15+
when: jenkins_repo_url is defined and jenkins_repo_url != ""
1616

1717
- name: Add Jenkins repo GPG key.
1818
rpm_key:
1919
state: present
2020
key: "{{ jenkins_repo_key_url }}"
21-
when: jenkins_repo_url | default(false)
21+
when: jenkins_repo_url is defined and jenkins_repo_url != ""
2222

2323
- name: Download specific Jenkins version.
2424
get_url:

0 commit comments

Comments
 (0)