From 859e2575e039e483393792095b5f857b6d42830c Mon Sep 17 00:00:00 2001 From: "Sergey Bubnov (omg)" Date: Fri, 28 Jun 2019 16:43:36 +0400 Subject: [PATCH] set sisyphus as platform when no node.platform is defined --- roles/common/templates/apt.list.j2 | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/roles/common/templates/apt.list.j2 b/roles/common/templates/apt.list.j2 index cf8eee3..43a5fd0 100644 --- a/roles/common/templates/apt.list.j2 +++ b/roles/common/templates/apt.list.j2 @@ -1,18 +1,20 @@ # {{ansible_managed}} -{% set key = env.apt[node.platform].key_name %} -{% set bp = env.apt[node.platform].branch_prefix %} -{% set url = env.apt[node.platform].url %} - -{% if node.platform is defined %} -rpm [{{key}}] {{url}} {{bp}}/{{node.arch}} classic -rpm [{{key}}] {{url}} {{bp}}/noarch classic +{% if node.platform is not defined %} + {% set platform = "sisyphus" %} {% else %} -rpm http://ftp.altlinux.org/pub/distributions/ALTLinux/Sisyphus x86_64 classic -rpm http://ftp.altlinux.org/pub/distributions/ALTLinux/Sisyphus noarch classic + {% set platform = node.platform %} +{% endif %} + +{% set key = env.apt[platform].key_name %} +{% set bp = env.apt[platform].branch_prefix %} +{% set url = env.apt[platform].url %} + {% if node.arch == 'e2k' %} rpm {{env.apt.sources[item].url}}/e2k/deb e2k alien rpm {{env.apt.sources[item].url}}/e2k e2k hasher rpm {{env.apt.sources[item].url}}/e2k/misc noarch hasher rpm {{env.apt.sources[item].url}}/e2k/lcc-1.21.24 e2k alien -{% endif %} +{% else %} +rpm [{{key}}] {{url}} {{bp}}/{{node.arch}} classic +rpm [{{key}}] {{url}} {{bp}}/noarch classic {% endif %}