Skip to content

Commit

Permalink
Prefix var names with role name
Browse files Browse the repository at this point in the history
  • Loading branch information
alexblackie committed May 16, 2024
1 parent ebe494f commit 7626e7f
Show file tree
Hide file tree
Showing 15 changed files with 37 additions and 39 deletions.
4 changes: 2 additions & 2 deletions roles/desktop/tasks/iosevka.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
- name: Download Iosevka font
become: "{{ workstation_fonts_dir_protected }}"
become: "{{ desktop_fonts_dir_protected }}"
ansible.builtin.unarchive:
src: https://github.com/be5invis/Iosevka/releases/download/v7.2.3/ttc-iosevka-7.2.3.zip
dest: "{{ workstation_fonts_dir }}"
dest: "{{ desktop_fonts_dir }}"
remote_src: true
2 changes: 1 addition & 1 deletion roles/desktop/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
- name: Install workstation apps and tools
become: "{{ elevate_for_package_installation }}"
ansible.builtin.package:
name: "{{ workstation_general_packages }}"
name: "{{ desktop_general_packages }}"
state: present

# Cross-platform Software
Expand Down
6 changes: 3 additions & 3 deletions roles/desktop/vars/darwin.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
workstation_fonts_dir: "{{ home }}/Library/Fonts"
workstation_fonts_dir_protected: false
desktop_fonts_dir: "{{ home }}/Library/Fonts"
desktop_fonts_dir_protected: false

workstation_general_packages: []
desktop_general_packages: []
6 changes: 3 additions & 3 deletions roles/desktop/vars/redhat.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
workstation_fonts_dir: /usr/share/fonts
workstation_fonts_dir_protected: true
desktop_fonts_dir: /usr/share/fonts
desktop_fonts_dir_protected: true

workstation_general_packages:
desktop_general_packages:
- mpv
- fuse-exfat
- gimp
Expand Down
8 changes: 4 additions & 4 deletions roles/dev/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
third_party_src: "{{ home }}/vendor"
dev_third_party_src: "{{ home }}/vendor"

fd_package: fd-find
redis_package: redis
mise_package: mise
dev_fd_package: fd-find
dev_redis_package: redis
dev_mise_package: mise
2 changes: 1 addition & 1 deletion roles/dev/tasks/fd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
- name: Install fd
become: "{{ elevate_for_package_installation }}"
ansible.builtin.package:
name: "{{ fd_package }}"
name: "{{ dev_fd_package }}"
state: present

- name: Check for fd symlinked exec
Expand Down
4 changes: 2 additions & 2 deletions roles/dev/tasks/fzy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
- name: Clone fzy
ansible.builtin.git:
repo: https://github.com/jhawthorn/fzy.git
dest: "{{ third_party_src }}/fzy"
dest: "{{ dev_third_party_src }}/fzy"
when: ansible_facts["os_family"] == "RedHat"

- name: Compile and install fzy
ansible.builtin.shell: make && make install
become: true
args:
chdir: "{{ third_party_src }}/fzy"
chdir: "{{ dev_third_party_src }}/fzy"
creates: /usr/local/bin/fzy
when: ansible_facts["os_family"] == "RedHat"

Expand Down
2 changes: 1 addition & 1 deletion roles/dev/tasks/java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
- name: Install JDK
become: "{{ elevate_for_package_installation }}"
ansible.builtin.package:
name: "{{ java_package }}"
name: "{{ dev_java_package }}"
state: present
tags:
- packages
Expand Down
2 changes: 1 addition & 1 deletion roles/dev/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
- name: Install development tools and libraries
become: "{{ elevate_for_package_installation }}"
ansible.builtin.package:
name: "{{ development_packages }}"
name: "{{ dev_packages }}"
state: present

- name: Set default shell to zsh
Expand Down
2 changes: 1 addition & 1 deletion roles/dev/tasks/mise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
- name: Install mise
become: "{{ elevate_for_package_installation }}"
ansible.builtin.package:
name: "{{ mise_package }}"
name: "{{ dev_mise_package }}"
state: present
tags:
- mise
6 changes: 3 additions & 3 deletions roles/dev/tasks/neovim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
- name: Ensure neovim dependencies are installed
become: "{{ elevate_for_package_installation }}"
ansible.builtin.package:
name: "{{ neovim_dependencies }}"
name: "{{ dev_neovim_dependencies }}"
state: present
tags:
- packages
Expand All @@ -11,7 +11,7 @@
- name: Clone neovim
ansible.builtin.git:
repo: https://github.com/neovim/neovim.git
dest: "{{ third_party_src }}/neovim"
dest: "{{ dev_third_party_src }}/neovim"
version: stable
update: true
force: true
Expand All @@ -21,7 +21,7 @@
- name: Compile and install neovim
ansible.builtin.command: make install CMAKE_INSTALL_PREFIX={{ home }}/.local CMAKE_BUILD_TYPE=RelWithDebInfo
args:
chdir: "{{ third_party_src }}/neovim"
chdir: "{{ dev_third_party_src }}/neovim"
creates: "{{ home }}/.local/bin/nvim"
tags:
- neovim
2 changes: 1 addition & 1 deletion roles/dev/tasks/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
- name: Install Python
become: "{{ elevate_for_package_installation }}"
ansible.builtin.package:
name: "{{ python_packages }}"
name: "{{ dev_python_packages }}"
state: present
tags:
- packages
Expand Down
12 changes: 6 additions & 6 deletions roles/dev/vars/darwin.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
development_packages:
dev_packages:
- autoconf
- entr
- findutils
Expand All @@ -24,16 +24,16 @@ development_packages:
- libyaml
- tree

fd_package: fd
java_package: openjdk@21
rtx_package: jdxcode/tap/rtx
dev_fd_package: fd
dev_java_package: openjdk@21
dev_rtx_package: jdxcode/tap/rtx

neovim_dependencies:
dev_neovim_dependencies:
- ninja
- libtool
- cmake
- pkg-config
- gettext

python_packages:
dev_python_packages:
- python3
10 changes: 4 additions & 6 deletions roles/dev/vars/debian.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
development_packages:
dev_packages:
- build-essential
- autoconf
- automake
Expand Down Expand Up @@ -44,9 +44,9 @@ development_packages:
- gawk
- zsh

java_package: default-jdk
dev_java_package: default-jdk

neovim_dependencies:
dev_neovim_dependencies:
- ninja-build
- gettext
- libtool
Expand All @@ -60,9 +60,7 @@ neovim_dependencies:
- curl
- doxygen

python_packages:
dev_python_packages:
- python3
- python3-dev
- python3-pip

redis_package: redis-server
8 changes: 4 additions & 4 deletions roles/dev/vars/redhat.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
development_packages:
dev_packages:
- zsh
- "@C Development Tools and Libraries"
- ImageMagick
Expand Down Expand Up @@ -40,11 +40,11 @@ development_packages:
- strace
- tree

java_package:
dev_java_package:
- java-latest-openjdk
- java-latest-openjdk-devel

neovim_dependencies:
dev_neovim_dependencies:
- ninja-build
- libtool
- autoconf
Expand All @@ -58,7 +58,7 @@ neovim_dependencies:
- patch
- gettext

python_packages:
dev_python_packages:
- python3
- python3-devel
- python3-pip

0 comments on commit 7626e7f

Please sign in to comment.