From e478f3c4205e35b269854831894636734de0c558 Mon Sep 17 00:00:00 2001 From: Frederik Wagner Date: Wed, 14 Mar 2018 11:49:42 +0100 Subject: [PATCH] ignore empty mongodb repository gpgkey settings --- templates/mongodb.repo.j2 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/templates/mongodb.repo.j2 b/templates/mongodb.repo.j2 index 1a28431..a030d21 100644 --- a/templates/mongodb.repo.j2 +++ b/templates/mongodb.repo.j2 @@ -1,8 +1,10 @@ [mongodb-org-{{ mongodb_version }}] name=MongoDB {{ mongodb_version }} Repository baseurl={{ mongodb_repository[item] }} -gpgcheck={{ mongodb_repository_gpgkey[item] is defined | ternary(1,0) }} -{% if mongodb_repository_gpgkey[item] is defined %} +{% if mongodb_repository_gpgkey[item] is defined and mongodb_repository_gpgkey[item] != '' %} +gpgcheck=1 gpgkey={{ mongodb_repository_gpgkey[item] }} +{% else %} +gpgcheck=0 {% endif %} enabled=1