test zsh playbook
This commit is contained in:
parent
45d9404f22
commit
6620a53ac6
1 changed files with 16 additions and 11 deletions
|
@ -16,7 +16,7 @@
|
||||||
state: present
|
state: present
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
|
|
||||||
- name: Pre-create basic .zshrc to avoid the zsh-newuser-install prompt
|
- name: Pre-create basic .zshrc
|
||||||
copy:
|
copy:
|
||||||
dest: "/home/{{ user }}/.zshrc"
|
dest: "/home/{{ user }}/.zshrc"
|
||||||
content: |
|
content: |
|
||||||
|
@ -45,14 +45,19 @@
|
||||||
owner: "{{ user }}"
|
owner: "{{ user }}"
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
|
|
||||||
- name: Install Oh My Zsh (unattended)
|
- name: Download Oh My Zsh installation script
|
||||||
shell: |
|
get_url:
|
||||||
RUNZSH=no sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
|
url: https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh
|
||||||
environment:
|
dest: /tmp/install_ohmyzsh.sh
|
||||||
HOME: "/home/{{ user }}"
|
|
||||||
|
- name: Run Oh My Zsh installation script
|
||||||
|
command: sh /tmp/install_ohmyzsh.sh --unattended
|
||||||
|
register: ohmyzsh_result
|
||||||
|
failed_when: "'FAILED' in ohmyzsh_result.stderr"
|
||||||
args:
|
args:
|
||||||
chdir: "/home/{{ user }}"
|
chdir: "/home/{{ user }}"
|
||||||
creates: "/home/{{ user }}/.oh-my-zsh"
|
environment:
|
||||||
|
HOME: "/home/{{ user }}"
|
||||||
|
|
||||||
- name: Ensure custom plugins directory exists
|
- name: Ensure custom plugins directory exists
|
||||||
file:
|
file:
|
||||||
|
@ -64,25 +69,25 @@
|
||||||
- name: Clone zsh-syntax-highlighting plugin
|
- name: Clone zsh-syntax-highlighting plugin
|
||||||
git:
|
git:
|
||||||
repo: https://github.com/zsh-users/zsh-syntax-highlighting.git
|
repo: https://github.com/zsh-users/zsh-syntax-highlighting.git
|
||||||
dest: "/home/{{ ansible_user }}/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting"
|
dest: "{{ zsh_custom }}/plugins/zsh-syntax-highlighting"
|
||||||
update: yes
|
update: yes
|
||||||
|
|
||||||
- name: Clone zsh-autosuggestions plugin
|
- name: Clone zsh-autosuggestions plugin
|
||||||
git:
|
git:
|
||||||
repo: https://github.com/zsh-users/zsh-autosuggestions.git
|
repo: https://github.com/zsh-users/zsh-autosuggestions.git
|
||||||
dest: "/home/{{ ansible_user }}/.oh-my-zsh/custom/plugins/zsh-autosuggestions"
|
dest: "{{ zsh_custom }}/plugins/zsh-autosuggestions"
|
||||||
update: yes
|
update: yes
|
||||||
|
|
||||||
- name: Clone zsh-history-substring-search plugin
|
- name: Clone zsh-history-substring-search plugin
|
||||||
git:
|
git:
|
||||||
repo: https://github.com/zsh-users/zsh-history-substring-search.git
|
repo: https://github.com/zsh-users/zsh-history-substring-search.git
|
||||||
dest: "/home/{{ ansible_user }}/.oh-my-zsh/custom/plugins/zsh-history-substring-search"
|
dest: "{{ zsh_custom }}/plugins/zsh-history-substring-search"
|
||||||
update: yes
|
update: yes
|
||||||
|
|
||||||
- name: Clone you-should-use plugin
|
- name: Clone you-should-use plugin
|
||||||
git:
|
git:
|
||||||
repo: https://github.com/MichaelAquilina/zsh-you-should-use.git
|
repo: https://github.com/MichaelAquilina/zsh-you-should-use.git
|
||||||
dest: "/home/{{ ansible_user }}/.oh-my-zsh/custom/plugins/you-should-use"
|
dest: "{{ zsh_custom }}/plugins/you-should-use"
|
||||||
update: yes
|
update: yes
|
||||||
|
|
||||||
- name: Ensure .local/bin directory exists
|
- name: Ensure .local/bin directory exists
|
||||||
|
|
Loading…
Reference in a new issue