---
- name: Create wpa_supplicant config for network under test
  copy:
   dest: /etc/wpa_supplicant/wpa_supplicant.conf
   mode: 0600
   content: |
     network={
        ssid="{{ wifi_network_under_test }}"
        key_mgmt=NONE
     }

- name: Create /etc/hosts entry for target machine (test server)
  lineinfile:
    path: /etc/hosts
    line: "{{ test_server_ip }} {{ test_server_hostname }}"

- name: Create directory for scripts
  file:
    state: directory
    dest: "{{ script_dest_dir }}"

- name: Copy runner wrapper script
  copy:
    src: ../../../../scripts/run.sh
    dest: "{{ script_dest_dir }}/run.sh"
    mode: 0755

- name: Copy test script
  copy:
    src: ../../../../scripts/downloader.py
    dest: "{{ script_dest_dir}}/downloader.py"

---
- name: Create wpa_supplicant config for network under test
  copy:
   dest: /etc/wpa_supplicant/wpa_supplicant.conf
   mode: 0600
   content: |
     network={
        ssid="{{ wifi_network_under_test }}"
        key_mgmt=NONE
     }

- name: Set country code
  command: iw reg set AU

- name: Create /etc/hosts entry for target machine (test server)
  lineinfile:
    path: /etc/hosts
    line: "{{ test_server_ip }} {{ test_server_hostname }}"

- name: Create directory for scripts
  file:
    state: directory
    dest: "{{ script_dest_dir }}"

- name: Copy runner wrapper script
  copy:
    src: ../../../../scripts/run.sh
    dest: "{{ script_dest_dir }}/run.sh"
    mode: 0755

- name: Copy test script
  copy:
    src: ../../../../scripts/downloader.py
    dest: "{{ script_dest_dir}}/downloader.py"

Set country code on test clients
Set country code on test clients
