--- # Defining the remote server where the package will be deployed - hosts: test remote_user: root become: yes become_method: sudo tasks: # create the Freifunk bridge interface file # copy fflux-test interface file to remote host - name: Copy interface file with owner and permissions ansible.builtin.copy: src: /home/fflux/Infrastructure-Intern/server_config/gw_configs/fflux-test/freifunk dest: /etc/network/interfaces.d/freifunk owner: root group: root mode: '0644' # create dnsmasq file # copy fflux-test dnsmasq file to remote host - name: Copy dnsmasq file with owner and permissions ansible.builtin.copy: src: /home/fflux/Infrastructure-Intern/server_config/gw_configs/fflux-test/fflux dest: /etc/dnsmasq.d/fflux owner: root group: root mode: '0644' # create fastd config file # copy fflux-test dnsmasq file to remote host - name: Copy fastd config file with owner and permissions ansible.builtin.copy: src: /home/fflux/Infrastructure-Intern/server_config/gw_configs/fflux-test/fastd.conf dest: /etc/fastd/fflux/fastd.conf owner: root group: root mode: '0644' # create respondd config file # copy fflux-test respondd file to remote host - name: Copy respondd config file with owner and permissions ansible.builtin.copy: src: /home/fflux/Infrastructure-Intern/server_config/gw_configs/fflux-test/respondd.conf dest: /opt/mesh-announce/respondd.conf owner: root group: root mode: '0644' # Reload deamon - name: reload systemd command: systemctl daemon-reload # STart respondd - name: start respondd command: systemctl start respondd # Enable respondd - name: enable respondd command: systemctl enable respondd # syncronize gateway peers # Reboot and reconnect - name: Reboot host and wait for it to restart reboot: msg: "Reboot initiated by Ansible" connect_timeout: 5 reboot_timeout: 600 pre_reboot_delay: 0 post_reboot_delay: 30 test_command: whoami