- name: Install essential packages package: name: "{{ packages + node_packages }}" state: latest - name: Git pull on Melody's repository become: false git: repo: "https://github.com/NerdyTechy/{{ melody }}" dest: "{{ repo_dir }}{{ melody }}" update: yes version: master - name: Create melody config.yml become: false template: src: templates/melody.yml.j2 dest: "{{ repo_dir }}{{ melody }}/config.yml" - name: Install packages based on package.json. community.general.npm: path: "{{ repo_dir }}{{ melody }}" - name: Create node systemd service files template: src: templates/node.service.j2 dest: "/etc/systemd/system/{{ melody }}.service" - name: Enable and start node services ansible.builtin.service: name: "{{ melody }}" enabled: yes state: started