master
1---
2# home.yml tasks
3
4- name: home - check git dir existance
5 stat:
6 path: "{{ home_dir }}"
7 register: home_git_dir
8
9- name: home - git clone (only if absent, touch yubikey for ssh key unlock)
10 git:
11 repo: git@github.com:bryfry/home.git
12 dest: "{{ home_dir }}"
13 accept_hostkey: True
14 when: not home_git_dir.stat.exists
15
16- name: home - symbolic links
17 file:
18 src: "{{ home_dir }}/{{ item }}"
19 dest: "{{ ansible_env.HOME }}/.{{ item }}"
20 state: link
21 force: yes
22 with_items:
23 - vimrc
24 - tmux.conf
25 - tmux.statusbar.conf
26 - bashrc
27 - bash_aliases
28
29- name: home - create elinks config dir
30 file:
31 path: "{{ ansible_env.HOME }}/.elinks"
32 state: directory
33
34- name: home - symbolic links (ssh config)
35 file:
36 src: "{{ home_dir }}/ssh_config"
37 dest: "{{ ansible_env.HOME }}/.ssh/config"
38 state: link
39 force: yes
40
41- name: home - symbolic links (elinks)
42 file:
43 src: "{{ home_dir }}/elinks.conf"
44 dest: "{{ ansible_env.HOME }}/.elinks/elinks.conf"
45 state: link
46 force: yes