From: Frank Brehm Date: Thu, 30 Jun 2022 12:11:22 +0000 (+0200) Subject: Adding and changing snippets for installing repo definition files X-Git-Tag: 2.6.2~1^2~8^2~22 X-Git-Url: https://git.uhu-banane.org/?a=commitdiff_plain;h=c2c5b081548e8626b84fae04d3de414804063ee0;p=pixelpark%2Fcreate-vmware-tpl.git Adding and changing snippets for installing repo definition files --- diff --git a/snippets/tpl.170.repos_el7.sh b/snippets/tpl.170.repos_el7.sh deleted file mode 100644 index 48ab4a1..0000000 --- a/snippets/tpl.170.repos_el7.sh +++ /dev/null @@ -1,34 +0,0 @@ -## !/bin/bash -#raw - -#----------------------------------------------------------- -get_repos_el7() { - - echo -e "\e[0Ksection_start:$( date +%s ):ks_get_repos_el7[collapsed=true]\r\e[0KGet yum repository files ..." - echo - echo "${HASH_LINE}" - echo "Calling get_repos_el7() ..." - echo - local base_url="${COBBLER_URL}/${ws_rel_filesdir}/${system_status}/repos/el7" - - local -a repos=('epel' 'icinga' 'pixelpark' 'prometheus' 'puppet' 'wazuh') - - 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 - - echo -e "\e[0Ksection_end:$( date +%s ):ks_get_repos_el7\r\e[0K" -} -get_repos_el7 - -#end raw diff --git a/snippets/tpl.175.repos_el7.sh b/snippets/tpl.175.repos_el7.sh new file mode 100644 index 0000000..48ab4a1 --- /dev/null +++ b/snippets/tpl.175.repos_el7.sh @@ -0,0 +1,34 @@ +## !/bin/bash +#raw + +#----------------------------------------------------------- +get_repos_el7() { + + echo -e "\e[0Ksection_start:$( date +%s ):ks_get_repos_el7[collapsed=true]\r\e[0KGet yum repository files ..." + echo + echo "${HASH_LINE}" + echo "Calling get_repos_el7() ..." + echo + local base_url="${COBBLER_URL}/${ws_rel_filesdir}/${system_status}/repos/el7" + + local -a repos=('epel' 'icinga' 'pixelpark' 'prometheus' 'puppet' 'wazuh') + + 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 + + echo -e "\e[0Ksection_end:$( date +%s ):ks_get_repos_el7\r\e[0K" +} +get_repos_el7 + +#end raw diff --git a/snippets/tpl.180.repos_almalinux8.sh b/snippets/tpl.180.repos_almalinux8.sh new file mode 100644 index 0000000..5c8db96 --- /dev/null +++ b/snippets/tpl.180.repos_almalinux8.sh @@ -0,0 +1,33 @@ +## !/bin/bash +#raw + +#----------------------------------------------------------- +get_repos_almalinux8() { + + echo + echo "${HASH_LINE}" + echo "Calling get_repos_repos_almalinux8() ..." + echo + local base_url="${COBBLER_URL}/${ws_rel_filesdir}/${system_status}/repos/alma8" + + local -a repos=('almalinux' 'almalinux-ha' 'almalinux-nft' 'almalinux-plus') + repos+=('almalinux-powertools' 'almalinux-resilientstorage' 'almalinux-rt') + + 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_almalinux8 + +#end raw diff --git a/snippets/tpl.180.repos_centos8.sh b/snippets/tpl.180.repos_centos8.sh index 4fdebd2..1b96d4c 100644 --- a/snippets/tpl.180.repos_centos8.sh +++ b/snippets/tpl.180.repos_centos8.sh @@ -10,8 +10,8 @@ get_repos_centos8() { echo local base_url="${COBBLER_URL}/${ws_rel_filesdir}/${system_status}/repos/centos8" - local -a repos=('CentOS-AppStream' 'CentOS-Base' 'CentOS-centosplus' 'CentOS-CR' 'CentOS-Devel') - repos+=('CentOS-Extras' 'CentOS-fasttrack' 'CentOS-HA' 'CentOS-PowerTools') + local -a repos=('CentOS-Stream-AppStream' 'CentOS-Stream-BaseOS' 'CentOS-Stream-Extras-common' 'CentOS-Stream-Extras') + repos+=('CentOS-Stream-HighAvailability' 'CentOS-Stream-NFV' 'CentOS-Stream-PowerTools' 'CentOS-Stream-ResilientStorage') local repo= local url= diff --git a/snippets/tpl.180.repos_rocky8.sh b/snippets/tpl.180.repos_rocky8.sh new file mode 100644 index 0000000..6a857d6 --- /dev/null +++ b/snippets/tpl.180.repos_rocky8.sh @@ -0,0 +1,33 @@ +## !/bin/bash +#raw + +#----------------------------------------------------------- +get_repos_rocky8() { + + echo + echo "${HASH_LINE}" + echo "Calling get_repos_rocky8() ..." + echo + local base_url="${COBBLER_URL}/${ws_rel_filesdir}/${system_status}/repos/rocky8" + + local -a repos=('Rocky-AppStream' 'Rocky-BaseOS' 'Rocky-Extras' 'Rocky-HighAvailability') + repos+=('Rocky-NFV' 'Rocky-Plus' 'Rocky-PowerTools' 'Rocky-ResilientStorage' 'Rocky-RT') + + 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_rocky8 + +#end raw diff --git a/snippets/tpl.181.repos_el8.sh b/snippets/tpl.181.repos_el8.sh deleted file mode 100644 index 0473cde..0000000 --- a/snippets/tpl.181.repos_el8.sh +++ /dev/null @@ -1,32 +0,0 @@ -## !/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 diff --git a/snippets/tpl.185.repos_el8.sh b/snippets/tpl.185.repos_el8.sh new file mode 100644 index 0000000..0473cde --- /dev/null +++ b/snippets/tpl.185.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 diff --git a/snippets/tpl.190.repos_almalinux9.sh b/snippets/tpl.190.repos_almalinux9.sh new file mode 100644 index 0000000..71027b1 --- /dev/null +++ b/snippets/tpl.190.repos_almalinux9.sh @@ -0,0 +1,34 @@ +## !/bin/bash +#raw + +#----------------------------------------------------------- +get_repos_almalinux9() { + + echo + echo "${HASH_LINE}" + echo "Calling get_repos_repos_almalinux9() ..." + echo + local base_url="${COBBLER_URL}/${ws_rel_filesdir}/${system_status}/repos/alma9" + + local -a repos=('almalinux-appstream' 'almalinux-baseos' 'almalinux-crb' 'almalinux-extras' ) + repos+=('almalinux-highavailability' 'almalinux-nfv' 'almalinux-plus') + repos+=('almalinux-resilientstorage' 'almalinux-rt' 'almalinux-sap' 'almalinux-saphana') + + 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_almalinux9 + +#end raw diff --git a/snippets/tpl.190.repos_centos9.sh b/snippets/tpl.190.repos_centos9.sh new file mode 100644 index 0000000..0132d97 --- /dev/null +++ b/snippets/tpl.190.repos_centos9.sh @@ -0,0 +1,32 @@ +## !/bin/bash +#raw + +#----------------------------------------------------------- +get_repos_centos9() { + + echo + echo "${HASH_LINE}" + echo "Calling get_repos_centos9() ..." + echo + local base_url="${COBBLER_URL}/${ws_rel_filesdir}/${system_status}/repos/centos9" + + local -a repos=('centos' 'centos-addons') + + 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_centos9 + +#end raw