__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.
This commit is contained in:
lubo 2018-05-04 16:37:45 +02:00
parent b5e96efcbf
commit 1efbd6a3a0

3
cdist/conf/type/__docker_config/explorer/config-data Normal file → Executable file
View file

@ -18,4 +18,5 @@
# along with cdist. If not, see <http://www.gnu.org/licenses/>. # 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