diff --git a/.ansible/desktop.yaml b/.ansible/desktop.yaml index 5c5c08c..571a32e 100644 --- a/.ansible/desktop.yaml +++ b/.ansible/desktop.yaml @@ -3,5 +3,19 @@ roles: - role: desktop vars_files: - - "roles/desktop/vars/{{ ansible_system|lower }}.yaml" - - "roles/desktop/vars/common.yaml" + - roles/desktop/vars/common.yaml + - "roles/desktop/vars/{{ ansible_system | lower }}.yaml" + tasks: + - import_tasks: roles/desktop/tasks/common/firefox.yaml + - import_tasks: roles/desktop/tasks/common/screen.yaml + + - block: + - import_tasks: roles/desktop/tasks/darwin/homebrew.yaml + - import_tasks: roles/desktop/tasks/darwin/mas.yaml + - import_tasks: roles/desktop/tasks/darwin/prefs.yaml + when: ansible_system == 'Darwin' + + - block: + - import_tasks: roles/desktop/tasks/linux/software.yaml + - import_tasks: roles/desktop/tasks/linux/config.yaml + when: ansible_system == 'Linux' diff --git a/.ansible/roles/desktop/files/screen/.screenrc b/.ansible/roles/desktop/tasks/common/files/screen/.screenrc similarity index 100% rename from .ansible/roles/desktop/files/screen/.screenrc rename to .ansible/roles/desktop/tasks/common/files/screen/.screenrc diff --git a/.ansible/roles/desktop/files/iterm2/com.googlecode.iterm2.plist b/.ansible/roles/desktop/tasks/darwin/files/iterm2/com.googlecode.iterm2.plist similarity index 100% rename from .ansible/roles/desktop/files/iterm2/com.googlecode.iterm2.plist rename to .ansible/roles/desktop/tasks/darwin/files/iterm2/com.googlecode.iterm2.plist diff --git a/.ansible/roles/desktop/files/iterm2/hybrid.itermcolors b/.ansible/roles/desktop/tasks/darwin/files/iterm2/hybrid.itermcolors similarity index 100% rename from .ansible/roles/desktop/files/iterm2/hybrid.itermcolors rename to .ansible/roles/desktop/tasks/darwin/files/iterm2/hybrid.itermcolors diff --git a/.ansible/roles/desktop/files/iterm2/shell_integration.bash b/.ansible/roles/desktop/tasks/darwin/files/iterm2/shell_integration.bash similarity index 100% rename from .ansible/roles/desktop/files/iterm2/shell_integration.bash rename to .ansible/roles/desktop/tasks/darwin/files/iterm2/shell_integration.bash diff --git a/.ansible/roles/desktop/tasks/darwin/00_homebrew.yaml b/.ansible/roles/desktop/tasks/darwin/homebrew.yaml similarity index 100% rename from .ansible/roles/desktop/tasks/darwin/00_homebrew.yaml rename to .ansible/roles/desktop/tasks/darwin/homebrew.yaml diff --git a/.ansible/roles/desktop/tasks/darwin/10_mas.yaml b/.ansible/roles/desktop/tasks/darwin/mas.yaml similarity index 100% rename from .ansible/roles/desktop/tasks/darwin/10_mas.yaml rename to .ansible/roles/desktop/tasks/darwin/mas.yaml diff --git a/.ansible/roles/desktop/tasks/darwin/20_prefs.yaml b/.ansible/roles/desktop/tasks/darwin/prefs.yaml similarity index 100% rename from .ansible/roles/desktop/tasks/darwin/20_prefs.yaml rename to .ansible/roles/desktop/tasks/darwin/prefs.yaml diff --git a/.ansible/roles/desktop/tasks/linux/10_config.yaml b/.ansible/roles/desktop/tasks/linux/config.yaml similarity index 100% rename from .ansible/roles/desktop/tasks/linux/10_config.yaml rename to .ansible/roles/desktop/tasks/linux/config.yaml diff --git a/.ansible/roles/desktop/tasks/linux/00_software.yaml b/.ansible/roles/desktop/tasks/linux/software.yaml similarity index 100% rename from .ansible/roles/desktop/tasks/linux/00_software.yaml rename to .ansible/roles/desktop/tasks/linux/software.yaml diff --git a/.ansible/roles/desktop/templates/conkyrc.j2 b/.ansible/roles/desktop/tasks/linux/templates/conkyrc.j2 similarity index 100% rename from .ansible/roles/desktop/templates/conkyrc.j2 rename to .ansible/roles/desktop/tasks/linux/templates/conkyrc.j2 diff --git a/.ansible/roles/desktop/tasks/main.yaml b/.ansible/roles/desktop/tasks/main.yaml deleted file mode 100644 index 91bb607..0000000 --- a/.ansible/roles/desktop/tasks/main.yaml +++ /dev/null @@ -1,5 +0,0 @@ -- name: "Desktop tasks ({{ ansible_system }})" - include: "{{ loop_task }}" - loop: "{{ query('fileglob', \"{{ ansible_system|lower }}/*\", \"common/*\") | sort }}" - loop_control: - loop_var: loop_task