ignore section 8 if community edition

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
This commit is contained in:
Thomas Sjögren 2019-08-28 11:49:22 +02:00
parent a785c02c59
commit d7f1d9753a
2 changed files with 26 additions and 9 deletions

View file

@ -149,9 +149,18 @@ docker_swarm_configuration() {
docker_enterprise_configuration() {
check_8
check_product_license
check_8_1
check_8_1_1
check_8_1_2
check_8_1_3
check_8_1_4
check_8_1_5
check_8_1_6
check_8_1_7
check_8_1_end
check_8_2
check_8_2_1
check_8_2_end
check_8_end
}

View file

@ -1,14 +1,5 @@
#!/bin/sh
check_product_license() {
if docker info -f '{{ .ProductLicense }}' | grep -qi 'Community Engine'; then
info " * Community Engine license, skipping section 8."
enterprise_license=0
else
enterprise_license=1
fi
}
check_8() {
logit "\n"
id_8="8"
@ -18,7 +9,20 @@ check_8() {
startsectionjson "$id_8" "$desc_8"
}
check_product_license() {
if docker version | grep -qi '^Client.*Community$'; then
info " * Community Engine license, skipping section 8"
enterprise_license=0
else
enterprise_license=1
fi
}
check_8_1() {
if [ "$enterprise_license" -ne 1 ]; then
return
fi
logit "\n"
id_8_1="8.1"
desc_8_1="Universal Control Plane Configuration"
@ -151,6 +155,10 @@ check_8_1_end() {
}
check_8_2() {
if [ "$enterprise_license" -ne 1 ]; then
return
fi
logit "\n"
id_8_2="8.2"
desc_8_2="Docker Trusted Registry Configuration"