Repos with recipes to deploy some infrastructure services
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.
 
 

33 lines
765 B

  1. ---
  2. - name: In mount state
  3. include: "{{ item.state | default('mounted', true) }}.yml"
  4. vars:
  5. mount: "{{ item }}"
  6. when:
  7. - action is undefined
  8. - (mounts | default([], true) | length) > 0
  9. with_items: "{{ mounts }}"
  10. - name: Update/create mount
  11. include: mounted.yml
  12. vars:
  13. mount: "{{ item }}"
  14. when:
  15. - action is defined
  16. - action == 'mounted'
  17. - item.state is undefined
  18. - (mounts | default([], true) | length) > 0
  19. with_items: "{{ mounts }}"
  20. - name: Delete mount
  21. include: unmounted.yml
  22. vars:
  23. mount: "{{ item }}"
  24. when:
  25. - action is defined
  26. - action == 'unmounted'
  27. - item.state is undefined
  28. - (mounts | default([], true) | length) > 0
  29. with_items: "{{ mounts }}"
  30. ...