--- - name: Install core dependencies tags: - install ansible.builtin.package: name: - zsh - name: Set shell become: true tags: - config ansible.builtin.user: name: "{{ username }}" shell: /usr/bin/zsh - name: Install context dependencies ansible.builtin.include_tasks: install.yml loop: "{{ contexts }}" loop_control: loop_var: context tags: - config - name: Clone nvm tags: - install ansible.builtin.git: accept_newhostkey: true clone: true force: true recursive: false repo: https://github.com/nvm-sh/nvm dest: "{{ home }}/.nvm" - name: Install node and set version tags: - config register: nodeinstall ansible.builtin.shell: source {{ home }}/.nvm/nvm.sh && nvm install 22 changed_when: "'is already installed' not in nodeinstall.stderr" args: executable: /bin/bash - name: Setup nvim tags: - config - nvim include_tasks: "nvim.yml" - name: Configure contexts ansible.builtin.include_tasks: config.yml loop: "{{ contexts }}" loop_control: loop_var: context tags: - config