- name: Create ConfigMap with keytab
k8s:
host: "{{ api_host }}"
api_version: v1
kind: ConfigMap
state: present
definition:
metadata:
name: cm-binary-data
namespace: test-namespace
binaryData:
binary-file.bin: "{{ lookup('file', 'files/binary_file.bin') | b64encode }}"
--
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/7f923096-1f9c-42be-9a4f-246db57dfd32%40googlegroups.com.
In short, you cannot send binary data in a module argument.If you can send base64 data instead of binary, you can use the `slurp` module to get the base64 encoded data. But you won't be able to do `{{ whatever.content|b64decode }}` since that would try and produce binary data. Effectively you cannot send binary data through the templating engine.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/7f923096-1f9c-42be-9a4f-246db57dfd32%40googlegroups.com.
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/1fbae5b8-3334-45d5-9a83-93528cb9fd6c%40googlegroups.com.
You can use something like:- slurp:path: /some/local/pathregister: some_vardelegate_to: localhostThen it would use localhost as the target.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/1fbae5b8-3334-45d5-9a83-93528cb9fd6c%40googlegroups.com.