diff --git a/salt/pkgrepo/suse/install.sls b/salt/pkgrepo/suse/install.sls index f87c105..09eef4d 100644 --- a/salt/pkgrepo/suse/install.sls +++ b/salt/pkgrepo/suse/install.sls @@ -2,6 +2,9 @@ # vim: ft=sls {% from "salt/map.jinja" import salt_settings with context %} +{#- Resorting to this ugly hack since the state doesn't handle if the `baseurl` is + already configured under another name, such as used by the `salt-bootstrap` #} +{%- if not salt["cmd.run"]("zypper lr --uri | grep " ~ salt_settings.pkgrepo) %} salt-pkgrepo-install-saltstack-suse: pkgrepo.managed: - name: systemsmanagement_saltstack_products @@ -11,3 +14,4 @@ salt-pkgrepo-install-saltstack-suse: - gpgcheck: 1 - gpgkey: {{ salt_settings.key_url }} - gpgautoimport: true +{%- endif %}