diff --git a/pillar/id/anna_infra_opensuse_org.sls b/pillar/id/anna_infra_opensuse_org.sls index 1bb33d0..c19adee 100644 --- a/pillar/id/anna_infra_opensuse_org.sls +++ b/pillar/id/anna_infra_opensuse_org.sls @@ -7,3 +7,4 @@ grains: - ntp salt_cluster: opensuse virt_cluster: atreju + subrole_ntp: ntp2 diff --git a/pillar/id/elsa_infra_opensuse_org.sls b/pillar/id/elsa_infra_opensuse_org.sls index 6098537..06d115f 100644 --- a/pillar/id/elsa_infra_opensuse_org.sls +++ b/pillar/id/elsa_infra_opensuse_org.sls @@ -7,3 +7,4 @@ grains: - ntp salt_cluster: opensuse virt_cluster: atreju + subrole_ntp: ntp3 diff --git a/pillar/role/ntp.sls b/pillar/role/ntp.sls index 86c4088..86b30d8 100644 --- a/pillar/role/ntp.sls +++ b/pillar/role/ntp.sls @@ -1,11 +1,15 @@ +{% set subrole_ntp = salt['grains.get']('subrole_ntp') %} + ntp: ng: settings: ntp_conf: peer: - - ntp1.infra.opensuse.org - - ntp2.infra.opensuse.org - - ntp3.infra.opensuse.org + {% for n in range(3) %} + {% if subrole_ntp != 'ntp{0}'.format(n+1) %} + - ntp{{ n+1 }}.infra.opensuse.org + {% endif %} + {% endfor %} restrict: - ntp1.opensuse.org - ntp2.opensuse.org