--- - name: enable plugins replace: path: "{{ oh_my_zsh_install_folder }}/.zshrc" regexp: "^plugins=\\(((.|\n)*)\\)" replace: "plugins=(\n {{ enable_plugins | join('\n ') }}\n)" - name: enable plugins replace: path: "/etc/skel/.zshrc" regexp: "^plugins=\\(((.|\n)*)\\)" replace: "plugins=(\n {{ enable_plugins | join('\n ') }}\n)"