Ansible repo for digital ocean projects
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.

преди 2 години
1234567891011121314151617181920212223242526
  1. # Using keyed groups and compose for hostvars
  2. plugin: community.digitalocean.digitalocean
  3. api_token: "{{ lookup('ansible.builtin.env', 'DO_API_TOKEN') }}"
  4. attributes:
  5. - id
  6. - name
  7. - memory
  8. - vcpus
  9. - disk
  10. - size
  11. - image
  12. - networks
  13. - volume_ids
  14. - tags
  15. - region
  16. keyed_groups:
  17. - key: do_tags | lower
  18. prefix: ''
  19. separator: ''
  20. compose:
  21. ansible_host: do_networks.v4 | selectattr('type','eq','public')
  22. | map(attribute='ip_address') | first
  23. class: do_size.description | lower
  24. distro: do_image.distribution | lower
  25. filters:
  26. - '"ansible" in do_tags'