Add tasks for XPS13

This commit is contained in:
Przemek Grondek 2023-05-17 14:51:15 +02:00 committed by Przemyslaw Grondek
parent eb9f176046
commit 35ca98a742
3 changed files with 95 additions and 12 deletions

View File

@ -0,0 +1,13 @@
- name: Check if it's laptop
stat:
path: /sys/class/power_supply/BAT0/charge_control_end_threshold
register: battery_limiter_available
- name: Powersave tasks
import_tasks: powersave.yml
- when: battery_limiter_available.stat.exists
block:
- import_tasks: battery.yml
- import_tasks: asusctl.yml
- import_tasks: supergfxctl.yml

View File

@ -0,0 +1,72 @@
- 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

View File

@ -1,13 +1,11 @@
- name: Check if it's laptop
stat:
path: /sys/class/power_supply/BAT0/charge_control_end_threshold
register: battery_limiter_available
- name: Asus X13 Flow (2022) specific tasks
when:
- ansible_facts.board_vendor == "ASUSTeK COMPUTER INC."
- ansible_facts.board_name == "GV301RE"
import_tasks: asus-x13-flow.yml
- name: Powersave tasks
import_tasks: powersave.yml
- when: battery_limiter_available.stat.exists
block:
- import_tasks: battery.yml
- import_tasks: asusctl.yml
- import_tasks: supergfxctl.yml
- name: Dell XPS 13 9320 specific tasks
when:
- ansible_facts.board_vendor == "Dell Inc."
- ansible_facts.board_name == "0CW9KM"
import_tasks: dell-xps13.yml