--- - name: Create directories for NPM file: path: "{{ item }}" state: directory mode: 0755 loop: - "{{ npm_base_dir }}" - "{{ npm_data_dir }}" - "{{ npm_letsencrypt_dir }}" - name: Deploy NPM docker-compose.yml template: src: docker-compose.yml.j2 dest: "{{ npm_base_dir }}/docker-compose.yml" mode: 0644 - name: Start NPM container shell: | cd {{ npm_base_dir }} docker compose up -d args: executable: /bin/bash - name: Wait for NPM to start pause: seconds: 15 - name: Check if NPM container is running shell: docker ps --filter name=npm --format "table {{.Names}}\\t{{.Status}}" register: npm_check changed_when: false - name: Show NPM status debug: var: npm_check.stdout