File tree 2 files changed +14
-2
lines changed
2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 58
58
" 18.04" ,
59
59
" 20.04"
60
60
]
61
+ },
62
+ {
63
+ "operatingsystem" : " SLES" ,
64
+ "operatingsystemrelease" : [
65
+ " 12"
66
+ ]
61
67
}
62
68
],
63
69
"requirements" : [
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
3
hostname=$( hostname -f)
4
- osfamily=$( cat /etc/os-release | grep -qi ubuntu && echo " ubuntu" || echo " el" )
5
4
version=$( grep VERSION_ID /etc/os-release | cut -d ' "' -f 2)
6
5
arch=$( 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
7
13
8
14
# OS-specific modifications
9
15
[ " $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)
11
17
12
18
# Output a JSON result for ease of Task usage in Puppet Task Plans
13
19
cat << EOS
You can’t perform that action at this time.
0 commit comments