File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 5858 " 18.04" ,
5959 " 20.04"
6060 ]
61+ },
62+ {
63+ "operatingsystem" : " SLES" ,
64+ "operatingsystemrelease" : [
65+ " 12"
66+ ]
6167 }
6268 ],
6369 "requirements" : [
Original file line number Diff line number Diff line change 11#! /bin/bash
22
33hostname=$( hostname -f)
4- osfamily=$( cat /etc/os-release | grep -qi ubuntu && echo " ubuntu" || echo " el" )
54version=$( grep VERSION_ID /etc/os-release | cut -d ' "' -f 2)
65arch=$( uname -m)
6+ if grep -qi ubuntu /etc/os-release; then
7+ osfamily=" ubuntu"
8+ elif grep -qi sles /etc/os-release; then
9+ osfamily=" sles"
10+ else
11+ osfamily=" el"
12+ fi
713
814# OS-specific modifications
915[ " $osfamily " = " ubuntu" -a " $arch " = " x86_64" ] && arch=" amd64"
10- [ " $osfamily " = " el" ] && version=$( echo " $version " | cut -d . -f 1)
16+ [ " $osfamily " = " el" ] || [ " $osfamily " = " sles " ] && version=$( echo " $version " | cut -d . -f 1)
1117
1218# Output a JSON result for ease of Task usage in Puppet Task Plans
1319cat << EOS
You can’t perform that action at this time.
0 commit comments