__docker_config: Fix config-data explorer

Before this fix, the explorer returned binary data when config did
not exist.

This commit also removes dependency on jq and sets executable flag
on the explorer file.
remotes/origin/4.9
Ľubomír Kučera 7 years ago
parent b5e96efcbf
commit 1efbd6a3a0
  1. 3
      cdist/conf/type/__docker_config/explorer/config-data

@ -18,4 +18,5 @@
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
#
docker config inspect "${__object_id:?}" | jq -r '.[0].Spec.Data' | base64 -d
docker config inspect "${__object_id:?}" --format '{{json .Spec.Data}}' \
2>/dev/null | tr -d '"' | base64 -d

Loading…
Cancel
Save