FAILED! => {"changed": false, "msg": "TemplateNotFound: anVweXRlcmh1YkRvY2tlcmh1YmNvbmZpZ2pzb24uajI="}

26 views
Skip to first unread message

胡雷雷

unread,
Apr 7, 2020, 7:03:51 AM4/7/20
to Ansible Project
I want to create a k8s resource with operator-sdk in ansible model.  in my application, I want to {%include%} a template jupyterhubDockerhubconfigjson.j2 with same location of my based one.
liking this :
data:
.dockerconfigjson: "{% include "jupyterhubDockerhubconfigjson.j2" |b64encode %}"

However, when I add the b64encode action, it will fail. How could I encode its(a json configure file) content

Dick Visser

unread,
Apr 7, 2020, 7:14:36 AM4/7/20
to ansible...@googlegroups.com
You are including "jupyterhubDockerhubconfigjson.j2" |b64encode, which is "anVweXRlcmh1YkRvY2tlcmh1YmNvbmZpZ2pzb24uajI=".
Remove the b64encode filter?

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/c010102d-3e08-4d63-8b8a-1222be95d45a%40googlegroups.com.


--
Dick Visser
Trust & Identity Service Operations Manager
GÉANT

胡雷雷

unread,
Apr 7, 2020, 7:20:19 AM4/7/20
to Ansible Project
In fact, I want to add the encode here,  if I remove it, it will be OK

在 2020年4月7日星期二 UTC+8下午7:14:36,Dick Visser写道:
You are including "jupyterhubDockerhubconfigjson.j2" |b64encode, which is "anVweXRlcmh1YkRvY2tlcmh1YmNvbmZpZ2pzb24uajI=".
Remove the b64encode filter?

On Tue, 7 Apr 2020 at 13:04, 胡雷雷 <5019...@qq.com> wrote:
I want to create a k8s resource with operator-sdk in ansible model.  in my application, I want to {%include%} a template jupyterhubDockerhubconfigjson.j2 with same location of my based one.
liking this :
data:
.dockerconfigjson: "{% include "jupyterhubDockerhubconfigjson.j2" |b64encode %}"

However, when I add the b64encode action, it will fail. How could I encode its(a json configure file) content

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible...@googlegroups.com.

胡雷雷

unread,
Apr 7, 2020, 7:21:21 AM4/7/20
to Ansible Project

"anVweXRlcmh1YkRvY2tlcmh1YmNvbmZpZ2pzb24uajI=" is the  "jupyterhubDockerhubconfigjson.j2"
在 2020年4月7日星期二 UTC+8下午7:20:19,胡雷雷写道:

Dick Visser

unread,
Apr 7, 2020, 7:46:46 AM4/7/20
to ansible...@googlegroups.com
Without more context it's mostly guessing, but you might be looking for this:




To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/dc68f832-9751-4399-b51f-6b938ec48f09%40googlegroups.com.

胡雷雷

unread,
Apr 8, 2020, 1:49:47 AM4/8/20
to Ansible Project
Thanks, I used the function, it could import the template content.

Some background:
I want to create the secret resource in k8s cluster, which included the docker config json file.  the json will could be modified with some pre-defined vars(I write this part to a template file.)

在 2020年4月7日星期二 UTC+8下午7:46:46,Dick Visser写道:
Reply all
Reply to author
Forward
0 new messages