Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in DevOps and Agile by (12.7k points)

I am trying to deploy a configmap onto a cluster

- name: Make/Update all configmaps on the cluster

 kubernetes:

 api_endpoint: blah

 url_username: blah

 url_password: blah

 inline_data:

 apiVersion: v1

 kind: ConfigMap

 metadata: 

 name: blah

namespace: blah

 data: my-data.txt: "{{ data }}"

 state: present

data: |

 some = foo

 foo = some

(using spinnaker to attach it to pods)

When I go into the pod and open my-data.txt it displays:

some = foo\n foo = some\n

I want it to look exactly like the text and print newline rather than \n

Weird thing if I put ' ' single quotes somewhere in the text it prints the text as is but with the single quotes so :

data: |

 some = foo

 foo = some

' '

prints exactly the same.

I have tried to research but I couldn't find anything and I have been stuck on this for a while now.

1 Answer

0 votes
by (29.5k points)
I think the issue is related to the indentation,  try using spaces  instead of tab and i think it will work for you

Browse Categories

...