Guest User

Untitled

a guest
Nov 20th, 2018
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. ---
  2.  
  3. list_pool: 'list ltm pool {{ items }}'
  4. with_items:
  5. - 'abc123'
  6. - 'def456'
  7.  
  8. - name: List pool
  9. bigip_command:
  10. server: "{{ some_server }}"
  11. user: "{{ some_user }}"
  12. password: "{{ some_password }}"
  13. commands:
  14. - "{{ list_pool }}"
  15. validate_certs: no
  16. delegate_to: localhost
  17.  
  18. - name: Set list_pool fact
  19. set_fact:
  20. list_pool: "{{ list_pool | default([]) + [item] }}"
  21. with_items:
  22. - 'abc123'
  23. - 'def456'
  24.  
  25. - name: List pool
  26. bigip_command:
  27. server: "{{ some_server }}"
  28. user: "{{ some_user }}"
  29. password: "{{ some_password }}"
  30. commands:
  31. - "list ltm {{ item }}"
  32. validate_certs: no
  33. delegate_to: localhost
  34. with_items: "{{ list_pool }}"
Add Comment
Please, Sign In to add comment