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.
 
 
 

41 rivejä
872 B

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