You've already forked linux_ws2122_ansible
Initial Commit
This commit is contained in:
6
roles/vim/defaults/main.yml
Normal file
6
roles/vim/defaults/main.yml
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
vimrc_repository: https://git.cryptic.systems/volker.raschek/vim.git
|
||||
|
||||
vim_users: []
|
||||
# - user: markus
|
||||
# branch: master
|
19
roles/vim/tasks/git-clone.yml
Normal file
19
roles/vim/tasks/git-clone.yml
Normal file
@ -0,0 +1,19 @@
|
||||
---
|
||||
- name: "getent for user {{ item.user }}"
|
||||
getent:
|
||||
database: passwd
|
||||
key: "{{ item.user }}"
|
||||
|
||||
- name: "clone vimrc repository for user {{ item.user }}"
|
||||
git:
|
||||
repo: https://git.cryptic.systems/volker.raschek/vim.git
|
||||
dest: "{{ getent_passwd[item.user][4] }}/.vim"
|
||||
version: "{{ item.branch }}"
|
||||
|
||||
- name: correct permissions
|
||||
file:
|
||||
path: "{{ getent_passwd[item.user][4] }}/.vim"
|
||||
owner: "{{ getent_passwd[item.user][1] }}"
|
||||
group: "{{ getent_passwd[item.user][2] }}"
|
||||
state: directory
|
||||
recurse: yes
|
14
roles/vim/tasks/main.yml
Normal file
14
roles/vim/tasks/main.yml
Normal file
@ -0,0 +1,14 @@
|
||||
---
|
||||
- name: install vim
|
||||
yum:
|
||||
name: vim
|
||||
state: present
|
||||
|
||||
- name: install git to clone vimrc repository
|
||||
yum:
|
||||
name: git
|
||||
state: present
|
||||
|
||||
- name: clone vimrc repository
|
||||
include_tasks: git-clone.yml
|
||||
with_items: "{{ vim_users }}"
|
Reference in New Issue
Block a user