Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- "files_from_ftp":
- {
- "file1":
- {
- "full_name":"very-long-file-name-1"
- "url":"ftp://.....very-long-file-name-1.zip"
- },
- "file2":
- {
- "full_name":"very-long-file-name-2"
- "url":"ftp://.....very-long-file-name-2.zip"
- }
- },
- "files_from_network":
- {
- "file3":
- {
- "full_name":"very-long-file-name-3"
- "network_path":"file:///SOMEWHERE/ON/THE/NETWORK/very-long-file-name.zip"
- }
- },
- "files_from_s3":
- {
- "file4":
- {
- "full_name":"very-long-file-name-4"
- "url":"s3://some.s3.bucket/very-long-file-name-4.tar"
- }
- }
- - name: process files from ftp
- shell: some_command -f /home/ubuntu/downloaded_files/{{ item.value.full_name }}
- with_dict: files_from_ftp | default({})
- - name: process files from network
- shell: some_command -f /home/ubuntu/downloaded_files/{{ item.value.full_name }}
- with_dict: files_from_network | default({})
- - name: process files from s3
- shell: some_command -f /home/ubuntu/downloaded_files/{{ item.value.full_name }}
- with_dict: files_from_s3 | default({})
- - name: process all downloaded files
- shell: some_command -f /home/ubuntu/downloaded_files/{{ item.value.full_name }}
- with_dict: ( files_from_s3 | default({}) )
- and ( files_from_ftp | default({}) )
- and ( files_from_network | default({}) )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement