Create tasks for individual platforms as we need more than just packages

This commit is contained in:
Scott Wallace 2019-02-24 19:32:50 +00:00
parent 0b2818a7e9
commit 706ab302a7
6 changed files with 31 additions and 15 deletions

View file

@ -0,0 +1,8 @@
- name: 'Platform: Apple Inc. Laptop'
tags:
- platform
package:
name: "{{ item }}"
state: present
loop: ['mbpfan']
become: true

View file

@ -0,0 +1,10 @@
- name: 'Platform: Google Laptop (Chromebook)'
tags:
- platform
block:
- name: 'Platform: Google Laptop: Audio drivers'
unarchive:
src: files/google-laptop-audio.tar.gz
dest: /
become: true

View file

@ -1,2 +1,15 @@
- import_tasks: software.yaml
- import_tasks: config.yaml
- name: Check platform-specific file exists
tags:
- platform
stat:
path: "{{ role_path }}/tasks/includes/platform_{{ ansible_system_vendor | lower + '_' + ansible_form_factor | lower }}.yaml"
register: platform_file
- name: Include platform-specific file
tags:
- platform
include_tasks: "{{ platform_file.stat.path }}"
when: platform_file.stat.exists

View file

@ -77,16 +77,6 @@
command: 'fc-cache -f'
when: fontfile.stat.exists == false
- name: Platform specific packages
tags:
- install
- platform
package:
name: "{{ item }}"
state: present
loop: "{{ lookup('vars', ansible_system_vendor + '_' + ansible_form_factor + '_packages', default=[]) }}"
become: true
- name: 'Gnome extensions'
tags:
- install

View file

@ -59,8 +59,3 @@ gnome_extension_ids:
- 28 # gtile
- 1386 # notification counter
- 19 # user themes
# Platform specific packages
# Format: systemvendor_formfactor_packages
"Apple Inc._Laptop_packages":
- mbpfan