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 lines
844 B

  1. ---
  2. - name: Login to azure
  3. command:
  4. argv:
  5. - "az"
  6. - "login"
  7. - "--service-principal"
  8. - "-u"
  9. - "{{ azure_client_id }}"
  10. - "-p"
  11. - "{{ azure_secret }}"
  12. - "-t"
  13. - "{{ azure_tenant }}"
  14. delegate_to: localhost
  15. - name: Select subscription
  16. command:
  17. argv:
  18. - "az"
  19. - "account"
  20. - "set"
  21. - "-s"
  22. - "{{ sentinel.law.subscriptionid }}"
  23. delegate_to: localhost
  24. - name: List solution
  25. command:
  26. argv:
  27. - "az"
  28. - "resource"
  29. - "list"
  30. - "--resource-type"
  31. - "Microsoft.OperationsManagement/solutions"
  32. - "--name"
  33. - "{{ sentinel.law.name | default('', true) }}"
  34. - "--tag"
  35. - "{{ sentinel.tag | default('', true) }}"
  36. register: azure_sentinel_facts
  37. delegate_to: localhost
  38. ...