Advertisement
Guest User

Untitled

a guest
Jul 29th, 2015
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. "files_from_ftp":
  2. {
  3. "file1":
  4. {
  5. "full_name":"very-long-file-name-1"
  6. "url":"ftp://.....very-long-file-name-1.zip"
  7. },
  8. "file2":
  9. {
  10. "full_name":"very-long-file-name-2"
  11. "url":"ftp://.....very-long-file-name-2.zip"
  12. }
  13. },
  14. "files_from_network":
  15. {
  16. "file3":
  17. {
  18. "full_name":"very-long-file-name-3"
  19. "network_path":"file:///SOMEWHERE/ON/THE/NETWORK/very-long-file-name.zip"
  20. }
  21. },
  22. "files_from_s3":
  23. {
  24. "file4":
  25. {
  26. "full_name":"very-long-file-name-4"
  27. "url":"s3://some.s3.bucket/very-long-file-name-4.tar"
  28. }
  29. }
  30.  
  31. - name: process files from ftp
  32. shell: some_command -f /home/ubuntu/downloaded_files/{{ item.value.full_name }}
  33. with_dict: files_from_ftp | default({})
  34.  
  35. - name: process files from network
  36. shell: some_command -f /home/ubuntu/downloaded_files/{{ item.value.full_name }}
  37. with_dict: files_from_network | default({})
  38.  
  39. - name: process files from s3
  40. shell: some_command -f /home/ubuntu/downloaded_files/{{ item.value.full_name }}
  41. with_dict: files_from_s3 | default({})
  42.  
  43. - name: process all downloaded files
  44. shell: some_command -f /home/ubuntu/downloaded_files/{{ item.value.full_name }}
  45. with_dict: ( files_from_s3 | default({}) )
  46. and ( files_from_ftp | default({}) )
  47. and ( files_from_network | default({}) )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement