Sivert V. Sæther
b3d85445c5
Good start Added roles for setting up a user with zsh config and ssh keys Also installation and configuriation of some packages
33 lines
1.4 KiB
YAML
33 lines
1.4 KiB
YAML
- name: Setup user zsh config
|
|
block:
|
|
- name: Add .zshrc
|
|
copy: src=zshrc.zsh dest=/home/{{ name }}/.zshrc owner={{ name }} group={{ name }} mode=0755
|
|
- name: Add zsh zstyles config
|
|
copy: src=zstyles.zsh dest=/home/{{ name }}/.zstyles owner={{ name }} group={{ name }} mode=0755
|
|
- name: Add .env file
|
|
copy: src=env.sh dest=/home/{{ name }}/.env owner={{ name }} group={{ name }} mode=0755
|
|
- name: Add .aliases
|
|
copy: src=aliases.sh dest=/home/{{ name }}/.aliases owner={{ name }} group={{ name }} mode=0755
|
|
- name: Add .bat.conf
|
|
copy: src=bat.conf dest=/home/{{ name }}/.bat.conf owner={{ name }} group={{ name }} mode=0755
|
|
|
|
- name: Install zsh syntax highlighting
|
|
git:
|
|
repo: https://github.com/zsh-users/zsh-syntax-highlighting.git
|
|
dest: /home/{{ name }}/.zshrc.d/zsh-syntax-highlighting
|
|
update: yes
|
|
clone: yes
|
|
rescue:
|
|
- name: Remove .zshrc
|
|
file: state=absent path=/home/{{ name }}/.zshrc
|
|
- name: Remove zsh zstyles config
|
|
file: state=absent path=/home/{{ name }}/.zstyles
|
|
- name: Remove .env file
|
|
file: state=absent path=/home/{{ name }}/.env
|
|
- name: Remove .aliases
|
|
file: state=absent path=/home/{{ name }}/.aliases
|
|
- name: Remove .bat.conf
|
|
file: state=absent path=/home/{{ name }}/.bat.conf
|
|
|
|
# - name: Remove zsh syntax highlighting
|
|
# file: state=absent path=/home/{{ name }}/.zshrc.d/zsh-syntax-highlighting |