1234567891011121314151617181920212223 |
- ---
- - name: Fetching container files
- hosts: localhost
- tasks:
- - name: Include vars file
- include_vars: "pod_details.yml"
- - name: Copying files from container env
- command: "kubectl cp {{ pod_name }}:{{ container_file_location | regex_replace('^\\/', '') }} {{ local_folder_location }} -n {{ namespace }} -c {{ container_name }}"
- changed_when: true
|