Re-jig 'desktop' for Ansible
This commit is contained in:
parent
d7257d876b
commit
47522e8382
|
@ -1,10 +1,6 @@
|
|||
- name: Desktop installation and configuration
|
||||
hosts: desktop
|
||||
|
||||
roles:
|
||||
- role: linux_desktop
|
||||
when: ansible_system == 'Linux'
|
||||
- role: jaredhocutt.gnome_extensions
|
||||
when: ansible_system == 'Linux'
|
||||
- role: mac_desktop
|
||||
when: ansible_system == 'Darwin'
|
||||
- role: desktop
|
||||
vars_files:
|
||||
- "roles/desktop/vars/{{ ansible_system|lower }}.yaml"
|
||||
|
|
3
.ansible/roles/desktop/meta/main.yaml
Normal file
3
.ansible/roles/desktop/meta/main.yaml
Normal file
|
@ -0,0 +1,3 @@
|
|||
dependencies:
|
||||
- role: jaredhocutt.gnome_extensions
|
||||
when: ansible_system == 'Linux'
|
|
@ -2,8 +2,13 @@
|
|||
tags:
|
||||
- config
|
||||
- firefox
|
||||
set_fact:
|
||||
block:
|
||||
- set_fact:
|
||||
firefox_path: '~/.mozilla/firefox'
|
||||
when: ansible_system == 'Linux'
|
||||
- set_fact:
|
||||
firefox_path: '~/Library/Application Support/Firefox'
|
||||
when: ansible_system == 'Darwin'
|
||||
|
||||
- name: 'Firefox: Discover profile path'
|
||||
tags:
|
15
.ansible/roles/desktop/tasks/main.yaml
Normal file
15
.ansible/roles/desktop/tasks/main.yaml
Normal file
|
@ -0,0 +1,15 @@
|
|||
- name: Common desktop tasks
|
||||
import_tasks: firefox.yaml
|
||||
|
||||
- name: Linux desktop tasks
|
||||
block:
|
||||
- import_tasks: software.yaml
|
||||
- import_tasks: config.yaml
|
||||
when: ansible_system == 'Linux'
|
||||
|
||||
- name: OS X desktop tasks
|
||||
block:
|
||||
- import_tasks: homebrew.yaml
|
||||
- import_tasks: mas.yaml
|
||||
- import_tasks: prefs.yaml
|
||||
when: ansible_system == 'Darwin'
|
|
@ -1,17 +1,19 @@
|
|||
- name: 'iTerm2: Add configuration'
|
||||
- name: 'Shell: Add iTerm2 configuration'
|
||||
tags:
|
||||
- config
|
||||
- iterm2
|
||||
- shell
|
||||
template:
|
||||
src: "iterm2/{{ item }}"
|
||||
dest: '~/.iterm2'
|
||||
mode: '0600'
|
||||
loop: ['com.googlecode.iterm2.plist', 'hybrid.itermcolors']
|
||||
|
||||
- name: 'Iterm2: Shell integration'
|
||||
- name: 'Shell: iTerm2 Bash integration'
|
||||
tags:
|
||||
- config
|
||||
- iterm2
|
||||
- shell
|
||||
copy:
|
||||
src: 'iterm2/shell_integration.bash'
|
||||
dest: '~/.bashrc.d'
|
||||
|
@ -38,35 +40,6 @@
|
|||
dest: '~/.bashrc.d/alias.gnu'
|
||||
mode: '0400'
|
||||
|
||||
- name: 'Firefox: Set base path'
|
||||
tags:
|
||||
- config
|
||||
- firefox
|
||||
- browser
|
||||
set_fact:
|
||||
firefox_path: '~/Library/Application Support/Firefox'
|
||||
|
||||
- name: 'Firefox: Find profile path'
|
||||
tags:
|
||||
- config
|
||||
- firefox
|
||||
- browser
|
||||
set_fact:
|
||||
profile_path: "{{ lookup('ini', 'Path section=Profile0 file=' + firefox_path + '/profiles.ini') }}"
|
||||
|
||||
- name: 'Firefox: Add local config'
|
||||
tags:
|
||||
- config
|
||||
- firefox
|
||||
- browser
|
||||
copy:
|
||||
content: |
|
||||
user_pref("geo.enabled", false);
|
||||
user_pref("privacy.window.maxInnerWidth", 1400);
|
||||
user_pref("privacy.window.maxInnerHeight", 900);
|
||||
dest: "{{ firefox_path }}/{{ profile_path }}/user.js"
|
||||
mode: '0600'
|
||||
|
||||
- name: 'OS X: Preferences'
|
||||
tags:
|
||||
- config
|
|
@ -1,4 +0,0 @@
|
|||
- name: Linux desktop tasks
|
||||
import_tasks: software.yaml
|
||||
- import_tasks: config.yaml
|
||||
- import_tasks: firefox.yaml
|
|
@ -1,4 +0,0 @@
|
|||
- name: Mac desktop tasks
|
||||
import_tasks: homebrew.yaml
|
||||
- import_tasks: mas.yaml
|
||||
- import_tasks: prefs.yaml
|
Loading…
Reference in a new issue