I need help to understand this issue : so I'm using ansible and basically I have a vault file that containe 3vvariables and in my role I have this section that is supposed to copy each variable of the vault to 3 different files :
- name: copy needed certificate
shell: echo {{ client_kafka_rsyslog_cer }} >> {{ dest_cert_file }}
shell: echo {{ client_kafka_rsyslog_key }} >> {{ dest_key_file }}
shell: echo {{ client_kafka_rsyslog_sdr_authority_cer }} >> {{ dest_ca_file }}
so client_kafka_* are the variables in the vault files, and I should have 3 files outputed with each containing the data of the variables, but I get only one file and it is always the last one for exemple here i get the dest_ca_file and it containes the correct value, but the two others are not created at all. if I comment this last line like this :
- name: copy needed certificate
shell: echo {{ client_kafka_rsyslog_cer }} >> {{ dest_cert_file }}
shell: echo {{ client_kafka_rsyslog_key }} >> {{ dest_key_file }}
#shell: echo {{ client_kafka_rsyslog_sdr_authority_cer }} >> {{ dest_ca_file }}
I get the dest_key_file with it's correct value, can someone explain me why it is only the last echo that is applied ? and how can i correct it.
thank you for your help.