ansible-role-common/tasks/devel-Darwin.yml

85 lines
2.4 KiB
YAML

---
# Common/Devel: Install and Configure Dev Env - macOS Version
- name: Devel - Fonts
community.general.homebrew_cask:
name: homebrew/cask-fonts/font-hack
state: present
# Install Visual Studio Code and Set Basic Configuration
- name: VSCode - Basics
when: user_vscode == true
block:
- name: VSCode - Basics - Install
community.general.homebrew_cask:
name: "{{ packages }}"
state: present
vars:
packages:
- visual-studio-code
# - name: VSCode - Basics - Additional dependencies (1)
# community.general.homebrew_cask:
# name: "{{ packages }}"
# state: present
# vars:
# packages:
# - java # TODO: needs user password!
# - name: VSCode - Basics - Additional dependencies (2)
# community.general.homebrew:
# name: "{{ packages }}"
# state: present
# vars:
# packages:
# - graphviz
- name: VSCode - Basics - Create settings directory
ansible.builtin.file:
path: "{{ ansible_user_dir }}/Library/Application Support/Code/User"
state: directory
- name: VSCode - Basics - Copy global settings
ansible.builtin.copy:
src: "{{ role_path }}/files/vscode-settings.json"
dest: "{{ ansible_user_dir }}/Library/Application Support/Code/User/settings.json"
# Dev Env - C/C++ Development Tools
- name: Devel - C/C++
when: user_lang_cpp == true
block:
- name: Devel - C/C++ - Install developer tools
community.general.homebrew:
name: "{{ packages }}"
state: present
vars:
packages:
- clang-format
diff: false
# Dev Env - Python Development Tools
# all done in vscode.yml
# Dev Env - Golang Development Tools
- name: Devel - Golang
when: user_lang_golang == true
block:
- name: Devel - Golang - Install developer tools
community.general.homebrew:
name: "{{ packages }}"
state: present
vars:
packages:
- go
diff: false
# Dev Env - LaTeX Distribution
- name: Devel - LaTeX
when: user_vscode == true and user_lang_latex == true
block:
- name: Devel - LaTeX - Install basic TeX distribution
community.general.homebrew_cask:
name: "{{ packages }}"
state: present
vars:
packages:
- basictex
- tex-live-utility
diff: false