--- - name: Configure Nebula Overlay Network hosts: all become: true tasks: - name: Install the Nebula network overlay community.general.pacman: name: nebula state: present - name: Make sure configuration directories exists file: path: /etc/nebula state: directory mode: '0755' - name: Copy over the Nebula CA certificate copy: src: ../../nebula/ca.crt dest: /etc/nebula/ca.crt mode: '0644' - name: Copy over certificates and keys for the nodes copy: src: "../../nebula/configs/{{ vmid }}/{{ inventory_hostname }}/{{ inventory_hostname }}.{{ item }}" dest: "/etc/nebula/config.{{ item }}" mode: '0600' loop: - crt - key - name: Create new node configurations template: src: ../templates/nebula-config.yml.j2 dest: /etc/nebula/config.yml notify: restart nebula handlers: - name: restart nebula systemd: name: nebula state: restarted enabled: true