From 221cdfcff0cec547676a67ef4d780324f2478e7f Mon Sep 17 00:00:00 2001 From: Theo Chatzimichos Date: May 10 2017 09:59:57 +0000 Subject: zypper related stuff moved to separate formula --- diff --git a/pillar/role/saltmaster.sls b/pillar/role/saltmaster.sls index 9130394..249560a 100644 --- a/pillar/role/saltmaster.sls +++ b/pillar/role/saltmaster.sls @@ -38,6 +38,7 @@ salt: - https://gitlab.opensuse.org/saltstack-formulas/sudoers-formula.git - https://gitlab.opensuse.org/saltstack-formulas/timezone-formula.git - https://gitlab.opensuse.org/saltstack-formulas/users-formula.git + - https://gitlab.opensuse.org/saltstack-formulas/zypper-formula.git gitfs_ssl_verify: True hash_type: sha512 pillar_gitfs_ssl_verify: True diff --git a/salt/profile/zypper.sls b/salt/profile/zypper.sls new file mode 100644 index 0000000..5b6f8ba --- /dev/null +++ b/salt/profile/zypper.sls @@ -0,0 +1,2 @@ +include: + - zypper diff --git a/salt/profile/zypper/config.sls b/salt/profile/zypper/config.sls deleted file mode 100644 index 0b4f78c..0000000 --- a/salt/profile/zypper/config.sls +++ /dev/null @@ -1,26 +0,0 @@ -{% set zypp_conf = salt['pillar.get']('zypper:config:zypp_conf', {}) %} -{% set zypper_conf = salt['pillar.get']('zypper:config:zypper_conf', {}) %} - -{% if zypp_conf %} -/etc/zypp/zypp.conf: - ini.options_present: - - sections: - {% for section, data in zypp_conf.iteritems() %} - {{ section }}: - {% for config, value in data.iteritems() %} - {{ config }}: '{{ value }}' - {% endfor %} - {% endfor %} -{% endif %} - -{% if zypper_conf %} -/etc/zypp/zypper.conf: - ini.options_present: - - sections: - {% for section, data in zypper_conf.iteritems() %} - {{ section }}: - {% for config, value in data.iteritems() %} - {{ config }}: '{{ value }}' - {% endfor %} - {% endfor %} -{% endif %} diff --git a/salt/profile/zypper/init.sls b/salt/profile/zypper/init.sls deleted file mode 100644 index fac8823..0000000 --- a/salt/profile/zypper/init.sls +++ /dev/null @@ -1,4 +0,0 @@ -include: - - profile.zypper.config - - profile.zypper.packages - - profile.zypper.repositories diff --git a/salt/profile/zypper/packages.sls b/salt/profile/zypper/packages.sls deleted file mode 100644 index f1090b7..0000000 --- a/salt/profile/zypper/packages.sls +++ /dev/null @@ -1,14 +0,0 @@ -{% set packages = salt['pillar.get']('zypper:packages', {}) %} - -{% for package, data in packages.iteritems() %} -{{ package }}: - pkg.installed: - {% if data.has_key('refresh') %} - - refresh: {{ data.refresh }} - {% else %} - - refresh: True - {% endif %} - {% if data.has_key('fromrepo') %} - - fromrepo: {{ data.fromrepo }} - {% endif %} -{% endfor %} diff --git a/salt/profile/zypper/repositories.sls b/salt/profile/zypper/repositories.sls deleted file mode 100644 index ba026c0..0000000 --- a/salt/profile/zypper/repositories.sls +++ /dev/null @@ -1,22 +0,0 @@ -{% set repositories = salt['pillar.get']('zypper:repositories', {}) %} - -{% for repo, data in repositories.items() %} -{{ repo }}: - pkgrepo.managed: - - baseurl: {{ data.baseurl }} - {% if data.has_key('priority') %} - - priority: {{ data.priority }} - {% endif %} - {% if data.has_key('refresh') %} - - refresh: {{ data.refresh }} - {% endif %} - {% if data.has_key('gpgcheck') %} - - gpgcheck: {{ data.gpgcheck }} - {% endif %} - {% if data.has_key('key_url') %} - - key_url: {{ data.key_url }} - {% endif %} - {% if data.has_key('gpgautoimport') %} - - gpgautoimport: {{ data.gpgautoimport }} - {% endif %} -{% endfor %}