Skip to content

Commit

Permalink
[bashible] replace use of lsb_release fuction by os-release parser fu…
Browse files Browse the repository at this point in the history
…nction
  • Loading branch information
RomanenkoDenys authored and nabokihms committed Nov 17, 2021
1 parent 37b2f21 commit 48d9577
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions candi/bashible/bashbooster/55_ubuntu_version.sh
Expand Up @@ -20,3 +20,7 @@ bb-is-ubuntu-version?() {
return 1
fi
}

bb-get-ubuntu-codename() {
source /etc/os-release && echo "${UBUNTU_CODENAME}"
}
Expand Up @@ -82,7 +82,7 @@ if [[ "$should_install_containerd" == true ]]; then

bb-deckhouse-get-disruptive-update-approval

containerd_version="$(sed "s/containerd.io=/containerd.io:/" <<< "${desired_version}")-$(lsb_release -cs)"
containerd_version="$(sed "s/containerd.io=/containerd.io:/" <<< "${desired_version}")-$(bb-get-ubuntu-codename)"
crictl_version="crictl:{{ .kubernetesVersion }}"
containerd_werf_edition_version="containerd-werf-edition:v1.4.6-werf-fix.2"
bb-rp-install "${containerd_version}" "${crictl_version}" "${containerd_werf_edition_version}"
Expand Down
Expand Up @@ -100,7 +100,7 @@ if [[ "$should_install_containerd" == true ]]; then

bb-deckhouse-get-disruptive-update-approval

containerd_version="$(sed "s/=/:/" <<< "${desired_version_containerd}")-$(lsb_release -cs)"
containerd_version="$(sed "s/=/:/" <<< "${desired_version_containerd}")-$(bb-get-ubuntu-codename)"
bb-rp-install "${containerd_version}"
fi

Expand Down
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

{{- if eq .bundle "ubuntu-lts" }}
bb-rp-install "nginx:1.20.1-$(lsb_release -cs)"
bb-rp-install "nginx:1.20.1-$(bb-get-ubuntu-codename)"
{{- else if eq .bundle "centos-7" }}
bb-rp-install "nginx:1.20.1-centos7"
{{- end }}
Expand Down

0 comments on commit 48d9577

Please sign in to comment.