Ansible_workstation/tasks/dotfiles.yml

115 lines
2.9 KiB
YAML

---
- name: Copy tmux.conf
template:
src: files/dotfiles/tmux.conf
dest: /home/{{ item.username }}/.tmux.conf
owner: "{{ item.username }}"
group: "{{ item.group }}"
with_items: "{{ me }}"
- name: Download antibody
get_url:
url: https://raw.githubusercontent.com/getantibody/installer/master/install
dest: /tmp/antibody.sh
mode: 0770
when: prompt == "zsh"
- name: Execute the antibody.sh
shell: /tmp/antibody.sh
become: yes
ignore_errors: yes
when: prompt == "zsh"
- name: Remove the antibody.sh
file: path=/tmp/antibody.sh state=absent
when: prompt == "zsh"
- name: Copy local zshrc
template:
src: files/dotfiles/zshrc
dest: /home/{{ item.username }}/.zshrc
owner: "{{ item.username }}"
group: "{{ item.group }}"
with_items: "{{ me }}"
when: prompt == 'zsh'
- name: Copy local zshrc.local
template:
src: files/dotfiles/zshrc.local
dest: /home/{{ item.username }}/.zshrc.local
owner: "{{ item.username }}"
group: "{{ item.group }}"
with_items: "{{ me }}"
when: prompt == 'zsh'
- name: Copy local zsh_plugins.txt
template:
src: files/dotfiles/zsh_plugins.txt
dest: /home/{{ item.username }}/.zsh_plugins.txt
owner: "{{ item.username }}"
group: "{{ item.group }}"
with_items: "{{ me }}"
when: prompt == 'zsh'
- name: Copy .vim/
copy:
src: files/dotfiles/vim/
dest: /home/{{ item.username }}/.vim/
owner: "{{ item.username }}"
group: "{{ item.group }}"
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.group }}"
with_items: "{{ me }}"
- name: Copy vimrc
template:
src: files/dotfiles/vimrc
dest: /home/{{ item.username }}/.vimrc
owner: "{{ item.username }}"
group: "{{ item.group }}"
with_items: "{{ me }}"
- name: Creates .ssh
file:
path: /home/{{ item.username }}/.ssh/
state: directory
owner: "{{ item.username }}"
group: "{{ item.group }}"
with_items: "{{ me }}"
- name: Copy ssh user config
template:
src: files/dotfiles/sshconfig
dest: /home/{{ item.username }}/.ssh/config
owner: "{{ item.username }}"
group: "{{ item.group }}"
with_items: "{{ deploy_users }}"
- name: Copy ssh user config
template:
src: files/dotfiles/sshconfig
dest: /home/{{ item.username }}/.ssh/config
owner: "{{ item.username }}"
group: "{{ item.group }}"
with_items: "{{ me }}"
- name: Copy gitconfig
template:
src: files/dotfiles/gitconfig
dest: /home/{{ item.username }}/.gitconfig
owner: "{{ item.username }}"
group: "{{ item.group }}"
with_items: "{{ me }}"