-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplaybook.yml
61 lines (51 loc) · 1.35 KB
/
playbook.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Config from github
---
- hosts: localhost
connection: local
vars:
repo_url: https://github.com/matthieup/config
config_dir: /tmp/configansible
user: matt
tasks:
- name: install my packages
package:
name:
- vim
- powerline
state: latest
become: true
- name: get config repository from github
git:
repo: "{{ repo_url }}"
dest: "{{ config_dir }}"
version: master
- name: copy ssh key from yubikey
authorized_key:
user: "{{ user }}"
state: present
key: "{{ lookup('file', '/tmp/configansible/yubikey-ssh-pub') }}"
- name: copy vimrc
copy:
src: "{{ config_dir }}/.vimrc"
dest: "/home/{{ user }}/.vimrc"
owner: "{{ user }}"
group: "{{ user }}"
mode: 0660
- name: get vundle
git:
repo: "https://github.com/VundleVim/Vundle.vim.git"
dest: "/home/{{ user }}/.vim/bundle/Vundle.vim"
version: master
- name: chown vim
command: "chown -R {{ user }} /home/{{ user }}/.vim"
args:
warn: no
- name: get plugins
command: vim +PluginInstall +qall
become: yes
become_user: "{{ user }}"
args:
stdin: "\n"
post_tasks:
- name: Remove config files
file: path="{{ config_dir }}" state=absent