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 @@ ...@@ -13,17 +13,25 @@
- name: clean pip dir - name: clean pip dir
become: true become: true
file: file:
path: '{{ansible_user_dir}}/.pip' path: '{{item}}/.pip'
state: absent state: absent
when: not china_mirror_pip when: not china_mirror_pip
with_items:
- '{{ansible_user_dir}}'
- /root
- name: pip dir - name: pip dir
become: true become: true
file: file:
path: '{{ansible_user_dir}}/.pip' path: '{{item.path}}/.pip'
state: directory state: directory
owner: '{{ansible_user_id}}' owner: '{{item.owner}}'
group: '{{ansible_user_id}}' group: '{{item.owner}}'
when: china_mirror_pip when: china_mirror_pip
with_items:
- path: '{{ansible_user_dir}}'
owner: '{{ansible_user_id}}'
- path: /root
owner: root
- name: pip conf for china mirror - name: pip conf for china mirror
become: true become: true
copy: copy:
...@@ -32,10 +40,15 @@ ...@@ -32,10 +40,15 @@
index-url = https://mirrors.aliyun.com/pypi/simple/ index-url = https://mirrors.aliyun.com/pypi/simple/
[install] [install]
trusted-host = mirrors.aliyun.com trusted-host = mirrors.aliyun.com
dest: '{{ansible_user_dir}}/.pip/pip.conf' dest: '{{item.path}}/.pip/pip.conf'
owner: '{{ansible_user_id}}' owner: '{{item.owner}}'
group: '{{ansible_user_id}}' group: '{{item.owner}}'
when: china_mirror_pip when: china_mirror_pip
with_items:
- path: '{{ansible_user_dir}}'
owner: '{{ansible_user_id}}'
- path: /root
owner: root
- name: clean easy install - name: clean easy install
become: true become: true
file: file:
......
...@@ -13,7 +13,30 @@ ...@@ -13,7 +13,30 @@
synchronize: synchronize:
src: .vim/ src: .vim/
dest: '~/.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 #- name: vim-editorconfig
# git: # git:
# repo: https://github.com/editorconfig/editorconfig-vim.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