From a9f3258cd957d13333c7b500058571582507a4ec Mon Sep 17 00:00:00 2001 From: "Sergey Bubnov (omg)" Date: Thu, 27 Jun 2019 14:09:53 +0400 Subject: [PATCH] use keyname and branch prefix from env --- roles/common/templates/apt.list.j2 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/roles/common/templates/apt.list.j2 b/roles/common/templates/apt.list.j2 index e943d29..eb60ba9 100644 --- a/roles/common/templates/apt.list.j2 +++ b/roles/common/templates/apt.list.j2 @@ -1,7 +1,10 @@ # {{ansible_managed}} +{% set key = env.apt.sources[item][node.platform].key_name %} +{% set bp = env.apt.sources[item][node.platform].branch_prefix %} + {% if node.platform is defined %} -rpm [{{node.platform}}] {{env.apt.sources[item].url}} {{node.platform}}/branch/{{node.arch}} classic -rpm [{{node.platform}}] {{env.apt.sources[item].url}} {{node.platform}}/branch/noarch classic +rpm [{{key}}] {{env.apt.sources[item].url}} {{bp}}/branch/{{node.arch}} classic +rpm [{{key}}] {{env.apt.sources[item].url}} {{bp}}/branch/noarch classic {% else %} rpm http://ftp.altlinux.org/pub/distributions/ALTLinux/Sisyphus x86_64 classic rpm http://ftp.altlinux.org/pub/distributions/ALTLinux/Sisyphus noarch classic