2020-01-26 16:09:52 +00:00
|
|
|
---
|
|
|
|
# Common/Usersetup: Auto-setup a user shell and prepare dotfiles - ArchLinux Version
|
|
|
|
# Will run once per user, because of lockfile `~/.ansbl-common-usersetup`
|
|
|
|
|
|
|
|
- name: usersetup - Check, if usersetup already ran
|
2021-08-28 14:58:03 +00:00
|
|
|
ansible.builtin.stat:
|
2020-01-26 16:09:52 +00:00
|
|
|
path: .ansbl-common-usersetup
|
|
|
|
register: common_usersetup
|
|
|
|
|
|
|
|
- name: usersetup - Change login shell to zsh for current user
|
|
|
|
become: yes
|
2021-08-28 14:58:03 +00:00
|
|
|
ansible.builtin.user:
|
2020-01-26 16:09:52 +00:00
|
|
|
name: "{{ ansible_user_id }}"
|
|
|
|
shell: /bin/zsh
|
|
|
|
when:
|
|
|
|
- common_usersetup.stat.exists == false and usersetup_chsh == true
|
|
|
|
|
|
|
|
# TODO: adapt to ArchLinux systems, if needed
|
|
|
|
# - name: usersetup - Install locales package
|
|
|
|
# become: yes
|
2021-08-28 14:58:03 +00:00
|
|
|
# ansible.builtin.apt:
|
2020-01-26 16:09:52 +00:00
|
|
|
# name: locales
|
|
|
|
# state: present
|
|
|
|
|
|
|
|
# - name: usersetup - Setup locale en_US
|
|
|
|
# become: yes
|
2021-08-28 14:58:03 +00:00
|
|
|
# ansible.builtin.locale_gen:
|
2020-01-26 16:09:52 +00:00
|
|
|
# name: en_US.UTF-8
|
|
|
|
# state: present
|
|
|
|
# when:
|
|
|
|
# - common_usersetup.stat.exists == false
|
|
|
|
# - name: usersetup - Setup locale de_DE
|
|
|
|
# become: yes
|
2021-08-28 14:58:03 +00:00
|
|
|
# ansible.builtin.locale_gen:
|
2020-01-26 16:09:52 +00:00
|
|
|
# name: de_DE.UTF-8
|
|
|
|
# state: present
|
|
|
|
# when:
|
|
|
|
# - common_usersetup.stat.exists == false
|
|
|
|
|
|
|
|
- name: usersetup - Create lockfile
|
2021-08-28 14:58:03 +00:00
|
|
|
ansible.builtin.file:
|
2020-01-26 16:09:52 +00:00
|
|
|
path: .ansbl-common-usersetup
|
|
|
|
state: touch
|
|
|
|
when:
|
|
|
|
- common_usersetup.stat.exists == false
|