--- - name: clone plugin git: repo: "{{ plugins_zsh[item].git }}" dest: "{{ oh_my_zsh_install_folder }}/custom/plugins/{{ item }}" depth: 1 with_items: "{{ plugins }}" - name: add plugin to enabled_plugins set_fact: enable_plugins: "{{ enable_plugins + [ item ] }}" with_items: "{{ plugins }}"