Ansible repository with playbooks to manage azure objects
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

43 rivejä
980 B

  1. ---
  2. - name: list resources
  3. include: list.yml
  4. vars:
  5. res: "{{ item }}"
  6. when:
  7. - action is defined
  8. - action == 'list'
  9. - (ress | default([], true) | length) > 0
  10. with_items: "{{ ress }}"
  11. - name: In log analytics workspace state
  12. include: "{{ item.state | default('present', true) }}.yml"
  13. vars:
  14. res: "{{ item }}"
  15. when:
  16. - action is undefined
  17. - (ress | default([], true) | length) > 0
  18. with_items: "{{ ress }}"
  19. - name: Update/create resources
  20. include: present.yml
  21. vars:
  22. res: "{{ item }}"
  23. when:
  24. - action is defined
  25. - action == 'present'
  26. - item.state is undefined
  27. - (ress | default([], true) | length) > 0
  28. with_items: "{{ ress }}"
  29. - name: Delete resources
  30. include: absent.yml
  31. vars:
  32. res: "{{ item }}"
  33. when:
  34. - action is defined
  35. - action == 'absent'
  36. - item.state is undefined
  37. - (ress | default([], true) | length) > 0
  38. with_items: "{{ ress }}"
  39. ...