---

- name: setup the network configuration
  template:
    src: interface.j2
    dest: /etc/network/interfaces.d/gsm-tester
  register: gsm_tester_network_interface

- name: start all network interface
  command: ifup -a
  when: gsm_tester_network_interface is changed

- name: allow ip forwarding and masquerading traffic from internal network (iptables)
  template:
    src: etc/iptables-ogt
    dest: /etc/network/if-up.d/iptables-ogt
    mode: 0755

- name: allow ip forwarding from internal network (sysctl)
  copy:
    src: ogt-sysctl.conf
    dest: /etc/sysctl.d
  notify: restart udev
