Commit eafe15f2 authored by nanahira's avatar nanahira

copy vim to root

parent 3bbd9f0f
Pipeline #584 passed with stage
in 3 minutes and 55 seconds
......@@ -13,17 +13,25 @@
- name: clean pip dir
become: true
file:
path: '{{ansible_user_dir}}/.pip'
path: '{{item}}/.pip'
state: absent
when: not china_mirror_pip
with_items:
- '{{ansible_user_dir}}'
- /root
- name: pip dir
become: true
file:
path: '{{ansible_user_dir}}/.pip'
path: '{{item.path}}/.pip'
state: directory
owner: '{{ansible_user_id}}'
group: '{{ansible_user_id}}'
owner: '{{item.owner}}'
group: '{{item.owner}}'
when: china_mirror_pip
with_items:
- path: '{{ansible_user_dir}}'
owner: '{{ansible_user_id}}'
- path: /root
owner: root
- name: pip conf for china mirror
become: true
copy:
......@@ -32,10 +40,15 @@
index-url = https://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host = mirrors.aliyun.com
dest: '{{ansible_user_dir}}/.pip/pip.conf'
owner: '{{ansible_user_id}}'
group: '{{ansible_user_id}}'
dest: '{{item.path}}/.pip/pip.conf'
owner: '{{item.owner}}'
group: '{{item.owner}}'
when: china_mirror_pip
with_items:
- path: '{{ansible_user_dir}}'
owner: '{{ansible_user_id}}'
- path: /root
owner: root
- name: clean easy install
become: true
file:
......
......@@ -13,7 +13,30 @@
synchronize:
src: .vim/
dest: '~/.vim'
delete: true
delete: yes
copy_links: yes
verify_host: no
recursive: yes
checksum: yes
archive: no
perms: yes
- name: vimrc for root
copy:
src: .vimrc
dest: '/root/.vimrc'
when: ansible_user_id != 'root'
- name: vim bundles
synchronize:
src: .vim/
dest: '/root/.vim'
delete: yes
copy_links: yes
verify_host: no
recursive: yes
checksum: yes
archive: no
perms: yes
when: ansible_user_id != 'root'
#- name: vim-editorconfig
# git:
# repo: https://github.com/editorconfig/editorconfig-vim.git
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment