diff --git a/.ansible/roles/linux_desktop/files/google-laptop-audio.tar.gz b/.ansible/roles/linux_desktop/files/google-laptop-audio.tar.gz new file mode 100644 index 0000000..50ad4e8 Binary files /dev/null and b/.ansible/roles/linux_desktop/files/google-laptop-audio.tar.gz differ diff --git a/.ansible/roles/linux_desktop/tasks/includes/platform_apple inc._laptop.yaml b/.ansible/roles/linux_desktop/tasks/includes/platform_apple inc._laptop.yaml new file mode 100644 index 0000000..fcff066 --- /dev/null +++ b/.ansible/roles/linux_desktop/tasks/includes/platform_apple inc._laptop.yaml @@ -0,0 +1,8 @@ +- name: 'Platform: Apple Inc. Laptop' + tags: + - platform + package: + name: "{{ item }}" + state: present + loop: ['mbpfan'] + become: true diff --git a/.ansible/roles/linux_desktop/tasks/includes/platform_google_laptop.yaml b/.ansible/roles/linux_desktop/tasks/includes/platform_google_laptop.yaml new file mode 100644 index 0000000..bb38ac2 --- /dev/null +++ b/.ansible/roles/linux_desktop/tasks/includes/platform_google_laptop.yaml @@ -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 diff --git a/.ansible/roles/linux_desktop/tasks/main.yaml b/.ansible/roles/linux_desktop/tasks/main.yaml index 81f6ea7..91cb5c4 100644 --- a/.ansible/roles/linux_desktop/tasks/main.yaml +++ b/.ansible/roles/linux_desktop/tasks/main.yaml @@ -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 diff --git a/.ansible/roles/linux_desktop/tasks/software.yaml b/.ansible/roles/linux_desktop/tasks/software.yaml index 69a9fb4..e616899 100644 --- a/.ansible/roles/linux_desktop/tasks/software.yaml +++ b/.ansible/roles/linux_desktop/tasks/software.yaml @@ -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 diff --git a/.ansible/roles/linux_desktop/vars/main.yaml b/.ansible/roles/linux_desktop/vars/main.yaml index 188aa0d..5d428e1 100644 --- a/.ansible/roles/linux_desktop/vars/main.yaml +++ b/.ansible/roles/linux_desktop/vars/main.yaml @@ -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