diff --git a/defaults/main.yml b/defaults/main.yml index 205c4a1..2c3e830 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,2 +1,8 @@ --- # defaults file for common + +# change login shell +usersetup_chsh: true + +# override global gitconfig +usersetup_gitconfig: true diff --git a/tasks/usersettings.yml b/tasks/usersettings.yml index 5bed266..5b8a8a1 100644 --- a/tasks/usersettings.yml +++ b/tasks/usersettings.yml @@ -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: diff --git a/tasks/usersetup-Darwin.yml b/tasks/usersetup-Darwin.yml index 3965c5f..6cc0468 100644 --- a/tasks/usersetup-Darwin.yml +++ b/tasks/usersetup-Darwin.yml @@ -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: diff --git a/tasks/usersetup-Debian.yml b/tasks/usersetup-Debian.yml index 035dfe1..fb11956 100644 --- a/tasks/usersetup-Debian.yml +++ b/tasks/usersetup-Debian.yml @@ -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: