Skip to content

Commit b095c3f

Browse files
authored
Merge pull request #86 from canonical/fix/snap-install
skip snap install if microk8s already installed
2 parents 9645dc7 + 2fb6a75 commit b095c3f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

controllers/cloudinit/scripts/00-install-microk8s.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@
44
# $0 $microk8s_snap_args
55
#
66
# Assumptions:
7-
# - snap is installed
7+
# - snapd is installed
8+
9+
if snap list microk8s; do
10+
echo "MicroK8s is already installed, will not install"
11+
exit 0
12+
fi
813

914
while ! snap install microk8s ${1}; do
1015
echo "Failed to install MicroK8s snap, will retry"

0 commit comments

Comments
 (0)