From 7d4e7cb5744f06d7e1f01189c5de04cf68acf79f Mon Sep 17 00:00:00 2001 From: "M. David Bennett" Date: Sat, 2 Nov 2024 11:54:54 -0500 Subject: [PATCH] Add exclude and includepkgs options for redhat repos Signed-off-by: M. David Bennett --- README.rst | 14 ++++++++++++++ linux/system/repo.sls | 6 ++++++ 2 files changed, 20 insertions(+) diff --git a/README.rst b/README.rst index a514faa..f3f6705 100644 --- a/README.rst +++ b/README.rst @@ -982,6 +982,20 @@ RedHat-based Linux with additional OpenStack repo: source: 'http://repos.fedorapeople.org/repos/openstack/openstack-icehouse/epel-6/' gpgcheck: 0 +RedHat-based Linux with Salt Project repo, pinned to version 3006: + +.. code-block:: yaml + + linux: + system: + ... + repo: + saltproject: + enabled: true + gpgkey: https://packages.broadcom.com/artifactory/api/security/keypair/SaltProjectKey/public + source: https://packages.broadcom.com/artifactory/saltproject-rpm/ + includepkgs: "*3006*" + Ensure system repository to use czech Debian mirror (``default: true``) Also pin it's packages with priority ``900``: diff --git a/linux/system/repo.sls b/linux/system/repo.sls index c495a55..695806b 100644 --- a/linux/system/repo.sls +++ b/linux/system/repo.sls @@ -206,6 +206,12 @@ linux_repo_{{ name }}: {%- if repo.gpgkey is defined %} - gpgkey: {{ repo.gpgkey }} {%- endif %} + {%- if repo.includepkgs is defined %} + - includepkgs: "{{ repo.includepkgs }}" + {%- endif %} + {%- if repo.exclude is defined %} + - exclude: "{{ repo.exclude }}" + {%- endif %} {%- endif %} {%- else %} pkgrepo.absent: