Skip to content

Commit

Permalink
Improve dotfiles role
Browse files Browse the repository at this point in the history
  • Loading branch information
danpawlik committed Sep 1, 2023
1 parent 401ef4a commit 2e467d5
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 16 deletions.
2 changes: 1 addition & 1 deletion ansible/playbooks/dotfiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
components:
- git
- common
- ansible
- nerdfonts
- nodejs
- vim
Expand All @@ -19,7 +20,6 @@
- system
- kubernetes
- flatpak
- ansible
- visualstudio
roles:
- dotfiles
2 changes: 1 addition & 1 deletion ansible/roles/dotfiles/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ enable_kubernetes_tools: true
enable_nested_virtualization: true
# small or full
nerd_fonts_pack: small
nerd_fonts_version: v3.0.1
nerd_fonts_version: v3.0.2
nerd_fonts:
- SourceCodePro
- RobotoMono
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/dotfiles/tasks/neovim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
state: directory
recurse: true

- name: Copy extracted neovim and make symlink to local bin
- name: Copy extracted neovim
copy:
src: /tmp/squashfs-root/
dest: ~/.local/nvim
Expand Down
14 changes: 5 additions & 9 deletions ansible/roles/dotfiles/tasks/nerdfonts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,11 @@
path: /tmp/fonts
state: directory

- name: Download fonts
get_url:
url: "https://github.com/ryanoasis/nerd-fonts/releases/download/{{ nerd_fonts_version }}/{{ item }}.zip"
dest: /tmp/
loop: "{{ nerd_fonts }}"

- name: Unzip fonts
shell: |
unzip /tmp/{{ item }}.zip -d /tmp/fonts
- name: Download and unzip fonts
ansible.builtin.unarchive:
src: "https://github.com/ryanoasis/nerd-fonts/releases/download/{{ nerd_fonts_version }}/{{ item }}.zip"
dest: /tmp/fonts
remote_src: true
loop: "{{ nerd_fonts }}"

- name: Remove windows fonts
Expand Down
7 changes: 3 additions & 4 deletions ansible/roles/dotfiles/tasks/system.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,9 @@

- name: Clear resolv.conf file
become: true
copy:
content: |
# CLEARED BY ANSIBLE
dest: /etc/resolv.conf
file:
path: /etc/resolv.conf
state: absent
when: _disable_resolved.changed

- name: Restart NetworkManager
Expand Down

0 comments on commit 2e467d5

Please sign in to comment.