Skip to content

Commit 903d374

Browse files
committed
Modified WiFi drivers to use ansible.builtin.shell instead of ansible.builtin.command in order to expand glob patterns
Also added redundancy by using cp instead of mv. Used chdir for cleaner style. Added debug register and task
1 parent 5423717 commit 903d374

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

src/software/embedded/ansible/playbooks/setup_pi.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,18 @@
8383
dest: ~/
8484
remote_src: true
8585

86-
- name: Set up Wifi drivers
86+
- name: Set up Wifi drivers (copy from /home/robot to /lib/firmware)
8787
become: true
8888
become_method: ansible.builtin.sudo
89-
ansible.builtin.command:
90-
cmd: "mv /home/{{ ansible_user }}/iwlwifi* /lib/firmware/"
89+
ansible.builtin.shell:
90+
chdir: "/home/{{ ansible_user }}"
91+
cmd: "cp iwlwifi* /lib/firmware/"
9192
creates: /lib/firmware/iwlwifi*.ucode
93+
register: wifi_fw_copy_status
94+
- name: Debug wifi copy status (add -v to command to see output)
95+
ansible.builtin.debug:
96+
var: wifi_fw_copy_status
97+
verbosity: 1
9298
- name: Set up systemd Wifi interface name rule
9399
ansible.builtin.import_tasks:
94100
file: ../tasks/setup_wifi_interface.yml

0 commit comments

Comments
 (0)