Changeset - df7b1bb5a852
[Not reviewed]
0 1 0
x - 21 months ago 2023-08-22 18:11:34
xbr@c3l.lu
fix: make all_gw_config comply with linter
1 file changed with 14 insertions and 25 deletions:
0 comments (0 inline, 0 general)
gateway/all_gw_config.yml
Show inline comments
 
---
 
# 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
0 comments (0 inline, 0 general)