From: Frank Brehm Date: Tue, 7 Jun 2022 11:16:02 +0000 (+0200) Subject: Splitting repos for CentOS8 into pure CentOS8 and common EL8 repos X-Git-Tag: 2.6.2~1^2~8^2~64 X-Git-Url: https://git.uhu-banane.org/?a=commitdiff_plain;h=4e229a02efacc913310e36d1fcc8a559527bd540;p=pixelpark%2Fcreate-vmware-tpl.git Splitting repos for CentOS8 into pure CentOS8 and common EL8 repos --- diff --git a/files/repos-centos8/epel.repo b/files/repos-centos8/epel.repo deleted file mode 100644 index 25bfee8..0000000 --- a/files/repos-centos8/epel.repo +++ /dev/null @@ -1,9 +0,0 @@ -[epel] -name=Extra Packages for Enterprise Linux 8 - $basearch -baseurl=https://repo02.pixelpark.com/Linux/yum/epel/$releasever/Everything/$basearch/ -enabled=1 -gpgcheck=1 -repo_gpgcheck=0 -gpgkey=https://repo02.pixelpark.com/gpg/RPM-GPG-KEY-EPEL-8 - -# vim: filetype=dosini diff --git a/files/repos-centos8/icinga.repo b/files/repos-centos8/icinga.repo deleted file mode 100644 index ac68df6..0000000 --- a/files/repos-centos8/icinga.repo +++ /dev/null @@ -1,8 +0,0 @@ -[icinga] -name=ICINGA (stable release for epel) -baseurl=https://repo02.pixelpark.com/Linux/yum/icinga/8 -enabled=1 -gpgcheck=1 -gpgkey=https://repo02.pixelpark.com/gpg/icinga2.gpg - -# vim: filetype=dosini diff --git a/files/repos-centos8/pixelpark.repo b/files/repos-centos8/pixelpark.repo deleted file mode 100644 index f8a5e6d..0000000 --- a/files/repos-centos8/pixelpark.repo +++ /dev/null @@ -1,8 +0,0 @@ -[pixelpark] -name=pixelpark -baseurl=https://repo02.pixelpark.com/Linux/yum/pixelpark/$releasever -enabled=1 -gpgcheck=1 -gpgkey=https://repo02.pixelpark.com/gpg/pixelpark.gpg - -# vim: filetype=dosini diff --git a/files/repos-centos8/prometheus.repo b/files/repos-centos8/prometheus.repo deleted file mode 100644 index e11608a..0000000 --- a/files/repos-centos8/prometheus.repo +++ /dev/null @@ -1,8 +0,0 @@ -[prometheus] -name=Prometheus Lest Repo -baseurl=https://repo02.pixelpark.com/Linux/yum/prom/8/ -enabled=1 -gpgcheck=1 -gpgkey=https://repo02.pixelpark.com/gpg/prometheus.gpg - -# vim: filetype=dosini diff --git a/files/repos-centos8/puppet.repo b/files/repos-centos8/puppet.repo deleted file mode 100644 index 56befe8..0000000 --- a/files/repos-centos8/puppet.repo +++ /dev/null @@ -1,9 +0,0 @@ -# Puppet.repo -[puppet] -name=Puppet Repository el 8 - $basearch -baseurl=https://repo02.pixelpark.com/Linux/yum/puppetlabs/puppet7/el/8/$basearch -gpgkey=https://repo02.pixelpark.com/gpg/RPM-GPG-KEY-puppet-20250406 -enabled=1 -gpgcheck=1 - -# vim: filetype=dosini diff --git a/files/repos-el8/epel.repo b/files/repos-el8/epel.repo new file mode 100644 index 0000000..25bfee8 --- /dev/null +++ b/files/repos-el8/epel.repo @@ -0,0 +1,9 @@ +[epel] +name=Extra Packages for Enterprise Linux 8 - $basearch +baseurl=https://repo02.pixelpark.com/Linux/yum/epel/$releasever/Everything/$basearch/ +enabled=1 +gpgcheck=1 +repo_gpgcheck=0 +gpgkey=https://repo02.pixelpark.com/gpg/RPM-GPG-KEY-EPEL-8 + +# vim: filetype=dosini diff --git a/files/repos-el8/icinga.repo b/files/repos-el8/icinga.repo new file mode 100644 index 0000000..ac68df6 --- /dev/null +++ b/files/repos-el8/icinga.repo @@ -0,0 +1,8 @@ +[icinga] +name=ICINGA (stable release for epel) +baseurl=https://repo02.pixelpark.com/Linux/yum/icinga/8 +enabled=1 +gpgcheck=1 +gpgkey=https://repo02.pixelpark.com/gpg/icinga2.gpg + +# vim: filetype=dosini diff --git a/files/repos-el8/pixelpark.repo b/files/repos-el8/pixelpark.repo new file mode 100644 index 0000000..f8a5e6d --- /dev/null +++ b/files/repos-el8/pixelpark.repo @@ -0,0 +1,8 @@ +[pixelpark] +name=pixelpark +baseurl=https://repo02.pixelpark.com/Linux/yum/pixelpark/$releasever +enabled=1 +gpgcheck=1 +gpgkey=https://repo02.pixelpark.com/gpg/pixelpark.gpg + +# vim: filetype=dosini diff --git a/files/repos-el8/prometheus.repo b/files/repos-el8/prometheus.repo new file mode 100644 index 0000000..e11608a --- /dev/null +++ b/files/repos-el8/prometheus.repo @@ -0,0 +1,8 @@ +[prometheus] +name=Prometheus Lest Repo +baseurl=https://repo02.pixelpark.com/Linux/yum/prom/8/ +enabled=1 +gpgcheck=1 +gpgkey=https://repo02.pixelpark.com/gpg/prometheus.gpg + +# vim: filetype=dosini diff --git a/files/repos-el8/puppet.repo b/files/repos-el8/puppet.repo new file mode 100644 index 0000000..56befe8 --- /dev/null +++ b/files/repos-el8/puppet.repo @@ -0,0 +1,9 @@ +# Puppet.repo +[puppet] +name=Puppet Repository el 8 - $basearch +baseurl=https://repo02.pixelpark.com/Linux/yum/puppetlabs/puppet7/el/8/$basearch +gpgkey=https://repo02.pixelpark.com/gpg/RPM-GPG-KEY-puppet-20250406 +enabled=1 +gpgcheck=1 + +# vim: filetype=dosini diff --git a/kickstart/template-centos8.ks b/kickstart/template-centos8.ks index f956e0a..fab998a 100644 --- a/kickstart/template-centos8.ks +++ b/kickstart/template-centos8.ks @@ -210,10 +210,15 @@ echo echo "Using snippet $clear_repos_snippet" $SNIPPET($clear_repos_snippet) -#set $get_repos_snippet = "per_status/" + $SYSTEM_STATUS + "/tpl.180.repos_centos8.sh" +#set $get_repos_centos_snippet = "per_status/" + $SYSTEM_STATUS + "/tpl.180.repos_centos8.sh" echo -echo "Using snippet $get_repos_snippet" -$SNIPPET($get_repos_snippet) +echo "Using snippet $get_repos_centos_snippet" +$SNIPPET($get_repos_centos_snippet) + +#set $get_repos_el_snippet = "per_status/" + $SYSTEM_STATUS + "/tpl.181.repos_el8.sh" +echo +echo "Using snippet $get_repos_el_snippet" +$SNIPPET($get_repos_el_snippet) #set $init_repos_snippet = "per_status/" + $SYSTEM_STATUS + "/tpl.200.init-repos.sh" echo diff --git a/lib/cr_vmware_tpl/__init__.py b/lib/cr_vmware_tpl/__init__.py index 3151388..6cdf0b0 100644 --- a/lib/cr_vmware_tpl/__init__.py +++ b/lib/cr_vmware_tpl/__init__.py @@ -3,7 +3,7 @@ import time -__version__ = '2.3.6' +__version__ = '2.4.0' # ------------------------------------------------------------------------- diff --git a/snippets/tpl.180.repos_centos8.sh b/snippets/tpl.180.repos_centos8.sh index ee1e161..4fdebd2 100644 --- a/snippets/tpl.180.repos_centos8.sh +++ b/snippets/tpl.180.repos_centos8.sh @@ -12,7 +12,6 @@ get_repos_centos8() { local -a repos=('CentOS-AppStream' 'CentOS-Base' 'CentOS-centosplus' 'CentOS-CR' 'CentOS-Devel') repos+=('CentOS-Extras' 'CentOS-fasttrack' 'CentOS-HA' 'CentOS-PowerTools') - repos+=('epel' 'icinga' 'pixelpark' 'prometheus' 'puppet') local repo= local url= diff --git a/snippets/tpl.181.repos_el8.sh b/snippets/tpl.181.repos_el8.sh new file mode 100644 index 0000000..0473cde --- /dev/null +++ b/snippets/tpl.181.repos_el8.sh @@ -0,0 +1,32 @@ +## !/bin/bash +#raw + +#----------------------------------------------------------- +get_repos_el8() { + + echo + echo "${HASH_LINE}" + echo "Calling get_repos_el8() ..." + echo + local base_url="${COBBLER_URL}/${ws_rel_filesdir}/${system_status}/repos/el8" + + local -a repos=('epel' 'icinga' 'pixelpark' 'prometheus' 'puppet') + + local repo= + local url= + local tmp_file= + for repo in "${repos[@]}" ; do + echo "Ensuring repo '${repo}.repo'..." + url="${base_url}/${repo}.repo" + tmp_file=$( mktemp ) + wget -O "${tmp_file}" --dns-timeout=2 --connect-timeout=3 --read-timeout=3 "${url}" || true + if [[ -s "${tmp_file}" ]] ; then + mv -v "${tmp_file}" "/etc/yum.repos.d/${repo}.repo" + fi + rm -fv "${tmp_file}" + done + +} +get_repos_el8 + +#end raw