Ansible_workstation/tasks/dotfiles.yml
2018-08-23 17:54:36 +02:00

110 lines
2.4 KiB
YAML

---
- name: git config name
git_config:
name: user.name
scope: global
value: "{{ item.name }}"
become_user: "{{ item.name }}"
with_items: "{{ me }}"
- email: git config email
git_config:
email: user.email
scope: global
value: "{{ item.email }}"
become_user: "{{ item.name }}"
with_items: "{{ me }}"
- name: Copy urxvt Xdefault
template:
src: files/Xdefaults
dest: /home/{{ item.username }}/.Xdefaults
with_items: "{{ me }}"
when: not minimal
- name: Install urxvt perls
pacman:
name: urxvt-perls
state: present
- name: Install urxvt plugins (AUR)
aur:
name: "{{ item }}"
use: makepkg
skip_installed: true
with_items:
- urxvt-fullscreen
- urxvt-resize-font-git
become: yes
become_user: aur_builder
- 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 }}"
with_items: "{{ me }}"
- name: Install tmuxinator
gem:
name: tmuxinator
state: latest
- name: Copy .vim/
copy:
src: files/vim/
dest: /home/{{ item.username }}/.vim/
owner: "{{ 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 }}"
with_items: "{{ me }}"
- name: Copy vimrc
template:
src: files/vimrc
dest: /home/{{ item.username }}/.vimrc
owner: "{{ item.username }}"
with_items: "{{ me }}"
- name: Copy .moc/
copy:
src: files/moc/
dest: /home/{{ item.username }}/.moc/
owner: "{{ item.username }}"
with_items: "{{ me }}"
when: not minimal
- name: Creates .ssh
file:
path: /home/{{ item.username }}/.ssh/
state: directory
owner: "{{ item.username }}"
with_items: "{{ me }}"
- name: Copy ssh user config
template:
src: files/sshconfig
dest: /home/{{ item.username }}/.ssh/config
owner: "{{ item.username }}"
with_items: "{{ me }}"