--- - name: install zsh import_tasks: install-zsh.yml - name: set value to enable git plugin set_fact: enable_plugins: - git - name: install powerlevel10k import_tasks: install-powerlevel10k.yml when: template is defined and "powerlevel10k" == template - name: include tasks import_tasks: install-zsh-plugins.yml - name: enable plugins import_tasks: enable-plugins.yml - name: active zsh for users user: name: "{{ item }}" shell: /bin/zsh with_items: "{{ oh-my-zsh-users }}" register: user - name: copy .zsh template to userhome .zshrc" copy: src: "/etc/skel/.zshrc" dest: "{{ item.home }}/.zshrc" with_items: "{{user.results}}" - name: copy .zsh template to userhome .zshrc" copy: src: "/etc/skel/.p10k.zsh" dest: "{{ item.home }}/.p10k.zsh" with_items: "{{user.results}}" when: template is defined and "powerlevel10k" == template - name: copy config to skel copy: src: "{{ role_path }}/files/.p10k.zsh" dest: "/etc/skel/.p10k.zsh" with_items: "{{user.results}}" when: template is defined and "powerlevel10k" == template