forked from ungleich-public/cdist
__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:
parent
b5e96efcbf
commit
1efbd6a3a0
1 changed files with 2 additions and 1 deletions
3
cdist/conf/type/__docker_config/explorer/config-data
Normal file → Executable file
3
cdist/conf/type/__docker_config/explorer/config-data
Normal file → Executable 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
|
||||||
|
|
Loading…
Reference in a new issue