ansible-desktop/roles/laptop/tasks/dell-xps13.yml
2023-06-01 11:06:48 +02:00

100 lines
2.6 KiB
YAML

- become: yes
block:
- name: Create temporary directory
ansible.builtin.tempfile:
state: directory
register: tmp_dir
- name: add ppa
apt_repository:
repo: ppa:oem-solutions-engineers/oem-projects-meta
- name: install drivers
become: yes
apt:
update_cache: yes
state: latest
pkg:
- oem-somerville-tentacool-meta
- name: Create temp dir
file:
path: "{{ tmp_dir.path }}"
state: directory
- name: download dell configure
unarchive:
src: https://dl.dell.com/FOLDER09518608M/1/command-configure_4.10.0-5.ubuntu22_amd64.tar.gz
dest: "{{ tmp_dir.path }}"
remote_src: yes
- name: Making a list of files
shell: "ls {{ tmp_dir.path }}"
register: command_result
- name: Install a .deb package
ansible.builtin.apt:
deb: "{{ tmp_dir.path }}/{{ item }}"
with_items:
- "{{ command_result.stdout_lines | reverse }}"
- name: Remove temp directory
become: yes
file:
path: "{{ tmp_dir.path }}"
state: absent
- name: Create temp dir
file:
path: "{{ tmp_dir.path }}"
state: directory
- name: Download old libssl because dell don't know how to package manage or update dependencies
get_url:
url: http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.18_amd64.deb
dest: "{{ tmp_dir.path }}/libssl1.deb"
- name: unpack deb file
shell:
cmd: "dpkg -x libssl1.deb {{ tmp_dir.path }}"
chdir: "{{ tmp_dir.path }}"
- name: copy libs
copy:
src: "{{ tmp_dir.path }}/usr/lib/x86_64-linux-gnu/"
dest: "/opt/dell/dcc"
remote_src: yes
- name: Remove temp directory
become: yes
file:
path: "{{ tmp_dir.path }}"
state: absent
- name: Install packages for camera
update_cache: yes
state: latest
apt:
update_cache: yes
state: latest
pkg:
- linux-modules-ipu6-generic-hwe-22.04
- linux-modules-ivsc-generic-hwe-22.04
- libcamhal-ipu6ep0
- name: pin camera libs
copy:
src: etc/apt/preferences.d/cameralibs
dest: /etc/apt/preferences.d/cameralibs
mode: '0644'
- name: Install packages for camera
state: latest
apt:
update_cache: yes
allow_downgrade: true
pkg:
- libgsticamerainterface-1.0-1=0~git202207130901.4d4293d~ubuntu22.04.2
- libipu6ep=0~git202204010644.0797f74-1~ubuntu22.04.1
- gstreamer1.0-icamera=0~git202207130901.4d4293d~ubuntu22.04.2