Changeset - e2975d0cef94
[Not reviewed]
0 1 0
x - 2 months ago 2025-03-14 23:43:42
xbr@c3l.lu
fix: replace check_vpn with TODO for blacklist download
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
gateway/initial_gw_setup.yml
Show inline comments
 
@@ -303,114 +303,114 @@
 
        src: "{{ server_scripts_dir }}/check_gateway.sh"
 
        dest: /usr/local/bin
 
        owner: root
 
        group: root
 
        mode: "0755"
 
      tags: config
 
    - name: Copy check vpn script
 
      ansible.builtin.copy:
 
        src: "{{ server_scripts_dir }}/check_vpn.sh"
 
        dest: /usr/local/bin
 
        owner: root
 
        group: root
 
        mode: "0755"
 
      tags: config
 

	
 
    # mesh-announce
 
    - name: Clone mesh-announce git repo
 
      ansible.builtin.git:
 
        repo: "https://github.com/ffnord/mesh-announce"
 
        dest: /opt/mesh-announce
 
        # TODO: Verify that there has been no update!
 
        version: 40be9a18ee91fa058478bc04105cbd79fd70279e
 
        force: true # Removes local changes
 
      tags: config
 
    - name: Configure respondd.service file
 
      ansible.builtin.lineinfile:
 
        path: /opt/mesh-announce/respondd.service
 
        regexp: "^ExecStart="
 
        line: "ExecStart=/opt/mesh-announce/respondd.py -d /opt/mesh-announce/providers -f /opt/mesh-announce/respondd.conf"
 
        state: present
 
      tags: config
 
    - name: Symbolic link for respondd.service
 
      ansible.builtin.file:
 
        src: /opt/mesh-announce/respondd.service
 
        dest: /etc/systemd/system/respondd.service
 
        owner: root
 
        group: root
 
        state: link
 
        force: true
 
      tags: config
 
    - name: Copy respondd.conf template w/ IP + Hardware
 
      ansible.builtin.template:
 
        src: "{{ server_config_dir }}/respondd.conf.j2"
 
        dest: /opt/mesh-announce/respondd.conf
 
        owner: root
 
        mode: "0644"
 
      tags: config
 
    - name: Enable + Start respondd.service
 
      ansible.builtin.service:
 
        name: "respondd"
 
        state: "started"
 
        enabled: "true"
 
      tags: config
 

	
 
    # dnsmasq
 
    - name: Make sure dnsmasq is started
 
      ansible.builtin.service:
 
        name: "dnsmasq"
 
        state: "started"
 
        enabled: "true"
 
      tags: config
 
    - name: Reload dnsmasq
 
      ansible.builtin.service:
 
        name: "dnsmasq"
 
        state: "reloaded"
 
      tags: config
 

	
 
    # Crontab
 
    - name: Add check_gateway to cron
 
      ansible.builtin.cron:
 
        name: "check if gateway is online"
 
        user: root
 
        job: "/usr/local/bin/check_gateway.sh > /dev/null 2>&1"
 
        state: "present"
 
        minute: "*"
 
        hour: "*"
 
        day: "*"
 
        month: "*"
 
        weekday: "*"
 
      tags: config
 
    - name: Add check_vpn to cron
 
      ansible.builtin.cron:
 
        name: "check if vpn is online"
 
        user: root
 
        job: "/usr/local/bin/check_vpn.sh > /dev/null 2>&1"
 
        state: "present"
 
        minute: "*"
 
        hour: "*"
 
        day: "*"
 
        month: "*"
 
        weekday: "*"
 
      tags: config
 
    - name: Regularly download the peer blacklist
 
      ansible.builtin.cron:
 
        name: "download blacklist"
 
        user: root
 
        job: "/usr/local/bin/check_vpn.sh > /dev/null 2>&1"
 
        job: "echo \"TODO: add blacklist working download (accessible publicly via link\""
 
        state: "present"
 
        minute: "*/5"
 
        hour: "*"
 
        day: "*"
 
        month: "*"
 
        weekday: "*"
 
      tags: config
 

	
 
    # Reboot and reconnect
 
    - name: Reboot host and wait for it to restart
 
      ansible.builtin.reboot:
 
        msg: "Reboot initiated by Ansible"
 
        connect_timeout: 5
 
        reboot_timeout: 600
 
        pre_reboot_delay: 0
 
        post_reboot_delay: 30
 
        test_command: whoami
0 comments (0 inline, 0 general)