preflight.yml 665 B

123456789101112131415161718192021
  1. ---
  2. - name: preflight - Init host_vars common
  3. include_tasks: init_vars.yml
  4. loop: "{{ groups['mesh_devices'] }}"
  5. when: hostvars[item].ip_host is not defined
  6. - name: preflight - Init host_vars vpn wireguard
  7. include_tasks: init_wg_vars.yml
  8. loop: "{{ groups['mesh_devices'] }}"
  9. when: with_wireguard and hostvars[item].vpn_wg0_privatekey is not defined
  10. - name: preflight - Generate lime-mac files
  11. template:
  12. src: lime_mac.j2
  13. dest: "../lime-mac/{{ hostvars[item].lime_mac }}"
  14. loop: "{{ groups['mesh_devices'] }}"
  15. delegate_to: localhost
  16. - name: preflight - Add wireguard keys to server
  17. include_tasks: vpn_wg_server.yml
  18. when: with_wireguard