ansible-role-common/tasks/usersetup-Darwin.yml

39 lines
960 B
YAML
Raw Normal View History

---
# Common/Usersetup: Auto-setup a user shell and prepare dotfiles - macOS Version
# Will run once per user, because of lockfile `~/.ansbl-common-usersetup`
- name: usersetup - Check, if usersetup already ran
stat:
path: .ansbl-common-usersetup
register:
common_usersetup
- name: usersetup - Change login shell to zsh for current user
become: yes
user:
name: "{{ ansible_user_id }}"
shell: /bin/zsh
when:
- common_usersetup.stat.exists == false
- name: usersetup - Create .vim directory
file:
path: .vim/autoload
state: directory
when:
- common_usersetup.stat.exists == false
- name: usersetup - Install vim plugin manager
get_url:
url: https://tpo.pe/pathogen.vim
dest: .vim/autoload/pathogen.vim
when:
- common_usersetup.stat.exists == false
- name: usersetup - Create lockfile
file:
path: .ansbl-common-usersetup
state: touch
when:
- common_usersetup.stat.exists == false