Is there a way to copy a file meantime create folder if it does not exists?
Below is my code to copy, however, it does not work as it create source_code_management
as a file, not as a directory.
- name: Transfer file
copy:
src: "{{ playbook_dir }}/roles/source_code_management/logger.xml"
dest: "{{ configuration_path }}"
The reason I wish to create and copy at same time is that Jenkins, will pass path/file_name.