From df7b1bb5a85212011bcf039f30a97da1d2463e7b 2023-08-22 18:11:34 From: x Date: 2023-08-22 18:11:34 Subject: [PATCH] fix: make all_gw_config comply with linter --- diff --git a/gateway/all_gw_config.yml b/gateway/all_gw_config.yml index 561c3af4844bd0ea8385709e4e1083a08efaec1d..203ca261b596076db7afdec3518caa22498bbdf0 100644 --- a/gateway/all_gw_config.yml +++ b/gateway/all_gw_config.yml @@ -1,14 +1,13 @@ --- # Defining the remote server where the package will be deployed -- hosts: test +- name: "Deploy new config" + hosts: test remote_user: root - become: yes - become_method: sudo + become: true + become_method: ansible.builtin.sudo tasks: -# create the Freifunk bridge interface file -# copy fflux-test interface file to remote host - - name: Copy interface file with owner and permissions + - name: Setup network interfaces (bridge + bat0) ansible.builtin.copy: src: /home/fflux/Infrastructure-Intern/server_config/gw_configs/fflux-test/freifunk dest: /etc/network/interfaces.d/freifunk @@ -16,8 +15,6 @@ 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 @@ -26,8 +23,6 @@ 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 @@ -36,8 +31,6 @@ 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 @@ -46,23 +39,19 @@ 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 + - name: Reload systemd daemon + ansible.builtin.systemd_service: + daemon_reload: true + - name: Re-Start + Enable respondd + ansible.builtin.service: + name: respondd + state: "restarted" + enabled: true # syncronize gateway peers -# Reboot and reconnect - name: Reboot host and wait for it to restart - reboot: + ansible.builtin.reboot: msg: "Reboot initiated by Ansible" connect_timeout: 5 reboot_timeout: 600