- name: Install loader.conf
  copy:
    src: "files/{{ item }}_loader.conf"
    dest: "/boot/loader.conf.d/{{ item }}.conf"
    mode: 0644
    owner: root
    group: wheel
  loop:
    - disable_wifi_powersave

- name: Install scripts
  copy:
    src: "files/{{ item.src }}"
    dest: "{{ item.dest }}"
    mode: 0755
    owner: root
    group: wheel
  loop:
    - src: launch_windows.bash
      dest: /usr/local/bin/launch_windows

- name: Install rc script
  copy:
    src: "files/{{ item.src }}"
    dest: "/usr/local/etc/rc.d/{{ item.dest|default(item.src) }}"
    owner: root
    group: wheel
    mode: 0755
  loop:
    - src: windows