#
[puppet]
-name=Puppet Repository el $releasever - $basearch
-baseurl=https://repo01.pixelpark.com/Linux/yum/puppetlabs/puppet5/el/$releasever/$basearch
+name=Puppet Repository el 7 - $basearch
+baseurl=https://repo01.pixelpark.com/Linux/yum/puppetlabs/puppet5/el/7/$basearch
gpgkey=https://repo01.pixelpark.com/Linux/yum/puppetlabs/RPM-GPG-KEY-puppet
enabled=1
gpgcheck=1
baseurl=https://repo01.pixelpark.com/Linux/yum/OracleLinux/OL7/ol7_addons/
enabled=1
gpgcheck=1
+gpgkey=https://repo01.pixelpark.com/Linux/yum/OracleLinux/OL7/RPM-GPG-KEY-oracle
# vim: filetype=dosini
echo "Using snippet $clear_repos_snippet"
$SNIPPET($clear_repos_snippet)
-## #set $get_repos_snippet = "per_status/" + $SYSTEM_STATUS + "/tpl.170.repos_oel7.sh"
-## echo
-## echo "Using snippet $get_repos_snippet"
-## $SNIPPET($get_repos_snippet)
+#set $get_repos_oel_snippet = "per_status/" + $SYSTEM_STATUS + "/tpl.170.repos_oel7.sh"
+echo
+echo "Using snippet $get_repos_oel_snippet"
+$SNIPPET($get_repos_oel_snippet)
+
+#set $get_repos_el_snippet = "per_status/" + $SYSTEM_STATUS + "/tpl.170.repos_el7.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
--- /dev/null
+## !/bin/bash
+#raw
+
+#-----------------------------------------------------------
+get_repos_el7() {
+
+ 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
+
+}
+get_repos_el7
+
+#end raw
--- /dev/null
+## !/bin/bash
+#raw
+
+#-----------------------------------------------------------
+get_repos_centos7() {
+
+ echo
+ echo "${HASH_LINE}"
+ echo "Calling get_repos_centos7() ..."
+ echo
+ local base_url="${COBBLER_URL}/${ws_rel_filesdir}/${system_status}/repos/centos7"
+
+ local -a repos=('ol7_addons' 'ol7_latest' 'ol7_optional_latest')
+
+ 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_centos7
+
+#end raw