add switches to disable chsh and global gitconfig

This commit is contained in:
Jannik Beyerstedt 2019-10-14 08:00:17 +02:00
parent 34a2109051
commit 4ea271dbf0
4 changed files with 15 additions and 3 deletions

View File

@ -1,2 +1,8 @@
---
# defaults file for common
# change login shell
usersetup_chsh: true
# override global gitconfig
usersetup_gitconfig: true

View File

@ -22,12 +22,18 @@
src: "{{ item.src }}"
dest: "{{ item.dest }}"
with_items:
- { src: '{{ role_path }}/files/dotfiles/_gitconfig', dest: '.gitconfig' }
- { src: '{{ role_path }}/files/dotfiles/_gitignore_global', dest: '.gitignore_global' }
- { src: '{{ role_path }}/files/dotfiles/_tmux.conf', dest: '.tmux.conf' }
- { src: '{{ role_path }}/files/dotfiles/_vimrc', dest: '.vimrc' }
- { src: '{{ role_path }}/files/dotfiles/_zshrc', dest: '.zshrc' }
- { src: '{{ role_path }}/files/dotfiles/_oh-my-zsh/custom/themes/agnoster.zsh-theme', dest: '.oh-my-zsh/custom/themes/agnoster.zsh-theme' }
- name: usersettings - Set global gitconfig
copy:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
with_items:
- { src: '{{ role_path }}/files/dotfiles/_gitconfig', dest: '.gitconfig' }
when: usersetup_gitconfig == true
- name: usersettings - Install vim plugins
git:

View File

@ -14,7 +14,7 @@
name: "{{ ansible_user_id }}"
shell: /bin/zsh
when:
- common_usersetup.stat.exists == false
- common_usersetup.stat.exists == false and usersetup_chsh == true
- name: usersetup - Create .vim directory
file:

View File

@ -14,7 +14,7 @@
name: "{{ ansible_user_id }}"
shell: /bin/zsh
when:
- common_usersetup.stat.exists == false
- common_usersetup.stat.exists == false and usersetup_chsh == true
- name: usersetup - Create .vim directory
file: