Guest User

Untitled

a guest
Feb 21st, 2018
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.42 KB | None | 0 0
  1. vars:
  2. - patches: [
  3.  
  4. PB.nfm.21.sp1.551.pb2017091516976,
  5. PB.ps.21.sp1.551.pb2017091591424,
  6. PB.ns.21.sp1.551.pb2017091854308,
  7. PB.ums.21.sp1.551.pb2017091828149,
  8. PB.ps.21.sp1.551.pb2017091592773,
  9. PB.as.21.sp1.551.pb2017091555706,
  10. PB.as.21.sp1.551.pb2017091555707,
  11. PB.xsp.21.sp1.551.pb2017091891314 ]
  12.  
  13. - name: Count all files in all PB archives
  14. register: patch_total
  15. delegate_to: localhost
  16. shell: "/usr/bin/unzip -l bw/patches/{{ item }}.Linux-x86_64.zip | awk '{count = $2} END{print count}'"
  17. with_items: "{{ patches|select('match','PB.as.')|list }}"
  18. - debug: var=patch_total.results
  19.  
  20. "patch_total.results": [
  21. {
  22. "_ansible_delegated_vars": {
  23. "ansible_delegated_host": "localhost",
  24. "ansible_host": "localhost"
  25. },
  26. "_ansible_ignore_errors": null,
  27. "_ansible_item_result": true,
  28. "_ansible_no_log": false,
  29. "_ansible_parsed": true,
  30. "changed": true,
  31. "cmd": "/usr/bin/unzip -l bw/patches/PB.as.21.sp1.551.pb2017091555706.Linux-x86_64.zip | awk '{count = $2} END{print count}'",
  32. "delta": "0:00:00.006809",
  33. "end": "2018-02-21 13:53:08.438719",
  34. "failed": false,
  35. "invocation": {
  36. "module_args": {
  37. "_raw_params": "/usr/bin/unzip -l bw/patches/PB.as.21.sp1.551.pb2017091555706.Linux-x86_64.zip | awk '{count = $2} END{print count}'",
  38. "_uses_shell": true,
  39. "chdir": null,
  40. "creates": null,
  41. "executable": null,
  42. "removes": null,
  43. "stdin": null,
  44. "warn": true
  45. }
  46. },
  47. "item": "PB.as.21.sp1.551.pb2017091555706",
  48. "rc": 0,
  49. "start": "2018-02-21 13:53:08.431910",
  50. "stderr": "",
  51. "stderr_lines": [],
  52. "stdout": "231",
  53. "stdout_lines": [
  54. "231"
  55. ]
  56. },
  57. {
  58. "_ansible_delegated_vars": {
  59. "ansible_delegated_host": "localhost",
  60. "ansible_host": "localhost"
  61. },
  62. "_ansible_ignore_errors": null,
  63. "_ansible_item_result": true,
  64. "_ansible_no_log": false,
  65. "_ansible_parsed": true,
  66. "changed": true,
  67. "cmd": "/usr/bin/unzip -l bw/patches/PB.as.21.sp1.551.pb2017091555707.Linux-x86_64.zip | awk '{count = $2} END{print count}'",
  68. "delta": "0:00:00.005809",
  69. "end": "2018-02-21 13:53:08.577996",
  70. "failed": false,
  71. "invocation": {
  72. "module_args": {
  73. "_raw_params": "/usr/bin/unzip -l bw/patches/PB.as.21.sp1.551.pb2017091555707.Linux-x86_64.zip | awk '{count = $2} END{print count}'",
  74. "_uses_shell": true,
  75. "chdir": null,
  76. "creates": null,
  77. "executable": null,
  78. "removes": null,
  79. "stdin": null,
  80. "warn": true
  81. }
  82. },
  83. "item": "PB.as.21.sp1.551.pb2017091555707",
  84. "rc": 0,
  85. "start": "2018-02-21 13:53:08.572187",
  86. "stderr": "",
  87. "stderr_lines": [],
  88. "stdout": "231",
  89. "stdout_lines": [
  90. "231"
  91. ]
  92. }
  93. ]
  94. }
Add Comment
Please, Sign In to add comment