Ansible_workstation/tasks/dotfiles.yml

146 lines
3.5 KiB
YAML

---
- name: Copy urxvt Xdefault
template:
src: files/Xdefaults
dest: /home/{{ item.username }}/.Xdefaults
with_items: "{{ me }}"
when: not minimal
- name: Clone TPM (tmux plugin manager)
git:
repo: https://github.com/tmux-plugins/tpm
dest: /home/{{ item.username }}/.tmux/plugins/tpm
version: master
accept_hostkey: yes
with_items: "{{ me }}"
- name: Copy tmux.conf
template:
src: files/tmux.conf
dest: /home/{{ item.username }}/.tmux.conf
owner: "{{ item.username }}"
group: "{{ item.username }}"
with_items: "{{ me }}"
- name: Install tmuxinator
gem:
name: tmuxinator
state: latest
when: not minimal and not server
- name: Copy .tmuxinator/
copy:
src: files/tmuxinator/
dest: /home/{{ item.username }}/.tmuxinator/
owner: "{{ item.username }}"
group: "{{ item.username }}"
with_items: "{{ me }}"
when: not minimal and not server
- name: Download antibody
get_url:
url: https://raw.githubusercontent.com/getantibody/installer/master/install
dest: /tmp/antibody.sh
mode: 0770
- name: Execute the antibody.sh
shell: /tmp/antibody.sh
become: yes
- name: Remove the antibody.sh
file: path=/tmp/antibody.sh state=absent
- name: Copy local zshrc
template:
src: files/zshrc
dest: /home/{{ item.username }}/.zshrc
owner: "{{ item.username }}"
group: "{{ item.username }}"
with_items: "{{ me }}"
- name: Copy local zshrc.local
template:
src: files/zshrc.local
dest: /home/{{ item.username }}/.zshrc.local
owner: "{{ item.username }}"
group: "{{ item.username }}"
with_items: "{{ me }}"
- name: Copy local zsh_plugins.txt
template:
src: files/zsh_plugins.txt
dest: /home/{{ item.username }}/.zsh_plugins.txt
owner: "{{ item.username }}"
group: "{{ item.username }}"
with_items: "{{ me }}"
- name: Copy .vim/
copy:
src: files/vim/
dest: /home/{{ item.username }}/.vim/
owner: "{{ item.username }}"
group: "{{ item.username }}"
with_items: "{{ me }}"
- name: Creates .vim/autoload/
file:
path: /home/{{ item.username }}/.vim/autoload/
state: directory
with_items: "{{ me }}"
- name: Download plug.vim
get_url:
url: https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
dest: /home/{{ item.username }}/.vim/autoload/plug.vim
owner: "{{ item.username }}"
group: "{{ item.username }}"
with_items: "{{ me }}"
- name: Copy vimrc
template:
src: files/vimrc
dest: /home/{{ item.username }}/.vimrc
owner: "{{ item.username }}"
group: "{{ item.username }}"
with_items: "{{ me }}"
- name: Copy .moc/
copy:
src: files/moc/
dest: /home/{{ item.username }}/.moc/
owner: "{{ item.username }}"
group: "{{ item.username }}"
with_items: "{{ me }}"
when: not minimal and not server
- name: Copy mpd.conf
template:
src: files/mpd.conf
dest: /home/{{ item.username }}/.config/mpd/mpd.conf
dest: /etc/mpd.conf
- name: Creates .ssh
file:
path: /home/{{ item.username }}/.ssh/
state: directory
owner: "{{ item.username }}"
group: "{{ item.username }}"
with_items: "{{ me }}"
- name: Copy ssh user config
template:
src: files/sshconfig
dest: /home/{{ item.username }}/.ssh/config
owner: "{{ item.username }}"
group: "{{ item.username }}"
with_items: "{{ me }}"
- name: Copy gitconfig
template:
src: files/gitconfig
dest: /home/{{ item.username }}/.gitconfig
owner: "{{ item.username }}"
group: "{{ item.username }}"
with_items: "{{ me }}"