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

Commit

Permalink
Add correct pip package for Ubuntu 20
Browse files Browse the repository at this point in the history
  • Loading branch information
mtlynch committed Jan 16, 2021
1 parent ca77b20 commit 397ecaf
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,28 @@
- name: install HID USB gadget
import_tasks: install_usb_gadget.yml

- name: install TinyPilot pre-requisite packages
apt:
name: "{{ packages }}"
state: present
vars:
packages:
- name: collect TinyPilot required apt packages on all systems
set_fact:
tinypilot_packages:
- git
- python-pip
- python3-venv
- sudo

- name: collect Debian and Ubuntu specific TinyPilot required apt packages
set_fact:
tinypilot_packages: "{{ tinypilot_packages }} + ['python-pip']"
when: ansible_distribution == 'Debian' or (ansible_distribution == 'Ubuntu' and ansible_distribution_version != '20.04')

- name: collect Ubuntu 20.04 specific TinyPilot required apt packages
set_fact:
tinypilot_packages: "{{ tinypilot_packages }} + ['python3-pip']"
when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '20.04'

- name: install TinyPilot pre-requisite packages
apt:
name: "{{ tinypilot_packages }}"
state: present

- name: create tinypilot group
group:
name: "{{ tinypilot_group }}"
Expand Down

0 comments on commit 397ecaf

Please sign in to comment.