Compare commits

...

2 Commits

Author SHA1 Message Date
62dde7026c Fix firefox role 2022-09-03 15:53:24 +02:00
9fa9cb3eee Fix laptop role 2022-09-03 15:53:10 +02:00
6 changed files with 29 additions and 27 deletions

View File

@ -4,13 +4,17 @@
ansible.builtin.package_facts:
manager: auto
- name: Print the package facts
ansible.builtin.debug:
var: ansible_facts.packages
- name: remove snap
community.general.snap:
name: firefox
state: absent
when:
- 'firefox' in ansible_facts.packages
- ansible_facts.packages['firefox'].version == "1:1snap1-0ubuntu2"
- "'firefox' in ansible_facts.packages"
- ansible_facts.packages['firefox'][0].version == "1:1snap1-0ubuntu2"
- name: remove apt snap wrapper version
apt:
@ -18,8 +22,8 @@
pkg:
- firefox
when:
- 'firefox' in ansible_facts.packages
- ansible_facts.packages['firefox'].version == "1:1snap1-0ubuntu2"
- "'firefox' in ansible_facts.packages"
- ansible_facts.packages['firefox'][0].version == "1:1snap1-0ubuntu2"
- name: add ppa
apt_repository:

View File

@ -26,8 +26,8 @@
target: install
- name: "Enable service"
ansible.builtin.systemd:
become: yes
ansible.builtin.systemd:
name: asusctl
state: started
enabled: yes

View File

@ -1,10 +1,3 @@
- name: Check if laptop has option to limit battery
stat:
path: /sys/class/power_supply/BAT0/charge_control_end_threshold
register: battery_limiter_available
- when: battery_limiter_available.stat.exists
block:
- name: Copy service to limit battery charge
become: yes
copy:

View File

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

View File

@ -26,8 +26,8 @@
target: install
- name: "Enable service"
ansible.builtin.systemd:
become: yes
ansible.builtin.systemd:
name: asusctl
state: started
enabled: yes