Skip to content

Commit

Permalink
Updating ansible playbook with stow
Browse files Browse the repository at this point in the history
  • Loading branch information
DMcP89 committed Jul 2, 2024
1 parent 45d05b2 commit a955d8f
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 30 deletions.
2 changes: 1 addition & 1 deletion ansible-playbooks/apt-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@
- ncurses-base
- ncurses-bin
- ncurses-term
- neovim
- openssh-server
- openssh-sftp-server
- pkg-config
Expand Down Expand Up @@ -156,6 +155,7 @@
- libmysqlclient-dev
- zsh
- jq
- stow
- name: Add my user to docker group
ansible.builtin.user:
name: "{{ ansible_user_id }}"
Expand Down
44 changes: 15 additions & 29 deletions ansible-playbooks/dotfile-copy.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,18 @@
---
- name: Copy dotfiles
- name: Configure dotfiles
hosts: localhost
tasks:
- name: Copy .bashrc
copy:
src: "{{ playbook_dir }}/../.bashrc"
dest: "/home/{{ ansible_user_id }}"
- name: Copy .bash_aliases
copy:
src: "{{ playbook_dir }}/../.bash_aliases"
dest: "/home/{{ ansible_user_id }}"
- name: Copy .profile
copy:
src: "{{ playbook_dir }}/../.profile"
dest: "/home/{{ ansible_user_id }}"
- name: Copy .vimrc
copy:
src: "{{ playbook_dir }}/../.vimrc"
dest: "/home/{{ ansible_user_id }}"
- name: Copy .gitconfig
copy:
src: "{{ playbook_dir }}/../.gitconfig"
dest: "/home/{{ ansible_user_id }}"
- name: Copy .vim
copy:
src: "{{ playbook_dir }}/../.vim"
dest: "/home/{{ ansible_user_id }}"
- name: Copy .config
copy:
src: "{{ playbook_dir }}/../.config"
dest: "/home/{{ ansible_user_id }}"
- name: Stow dotfile packages
shell: |
stow bash
stow git
stow btop
stow mdless
stow powerline
stow pypoetry
stow tmux
stow zsh
stow vim
stow nvim
args:
chdir: "{{ playbook_dir }}/.."
3 changes: 3 additions & 0 deletions ansible-playbooks/setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
- name: Install apt packages
import_playbook: apt-packages.yml

- name: Install snap packages
import_playbook: snap-packages.yml

- name: Copy dotfiles
import_playbook: dotfile-copy.yml

Expand Down
9 changes: 9 additions & 0 deletions ansible-playbooks/snap-packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
- name: snap-pacakges
hosts: localhost
tasks:
- name: Install "nvim" with option --classic
community.general.snap:
name: nvim
classic: true
become: true

0 comments on commit a955d8f

Please sign in to comment.