Skip to content
This repository has been archived by the owner on Apr 5, 2023. It is now read-only.

Commit

Permalink
Fix path of config.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
mtlynch committed Jan 16, 2021
1 parent 2eef6c7 commit 40b585a
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions tasks/install_usb_gadget.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
---
- name: set the path to config.txt
set_fact:
config_txt_path: /boot/config.txt

- name: set the path to config.txt for Ubuntu
set_fact:
config_txt_path: /boot/firmware/config.txt
when: ansible_distribution == 'Ubuntu'

- name: check for a boot config file
stat:
path: /boot/config.txt
path: "{{ config_txt_path }}"
register: boot_config_stat

- name: enable dwc2 driver in boot config
lineinfile:
path: /boot/config.txt
path: "{{ config_txt_path }}"
create: no
line: dtoverlay=dwc2
when: boot_config_stat.stat.exists
Expand Down

0 comments on commit 40b585a

Please sign in to comment.