--- - hosts: docker_hosts become: true tasks: - name: copy binanries ansible.builtin.copy: src: nebula-linux-arm64/nebula dest: /usr/local/bin/nebula mode: '0755' - name: Creates directory file: path: /etc/nebula state: directory # - name: copy config files - name: copying files copy: src: nebula-v2/config.yml.node dest: /etc/nebula/config.yml - name: replace line lineinfile: path: /etc/nebula/config.yml regexp: '^(.*)cert: /etc(.*)$' line: ' cert: /etc/nebula/{{ ansible_hostname }}.crt' backrefs: yes - name: replace line lineinfile: path: /etc/nebula/config.yml regexp: '^(.*)key: /etc(.*)$' line: ' key: /etc/nebula/{{ ansible_hostname }}.key' backrefs: yes # - name: copy certs and keys - name: copying files copy: src: nebula-v2/{{ ansible_hostname }}.crt dest: /etc/nebula/{{ ansible_hostname }}.crt - name: copying files copy: src: nebula-v2/{{ ansible_hostname }}.key dest: /etc/nebula/{{ ansible_hostname }}.key - name: copying files copy: src: nebula-v2/ca.crt dest: /etc/nebula/ca.crt # - name: create systemd service - name: install nebula systemd startup script copy: src: nebula-v2/nebula.service dest: /etc/systemd/system/nebula.service owner: root group: root mode: 0644 # - name: enable nebuka service - name: install nebula systemd startup script service: name: nebula state: started enabled: yes