shantanoo-desai / komponist

A Composer for your favorite IoT/ IIoT container stacks with Ansible + Jinja2 + Docker Compose v2
GNU Affero General Public License v3.0
25 stars 2 forks source link

[node-red] refactor bootstrapping + export nodes playbook #116

Closed shantanoo-desai closed 11 months ago

shantanoo-desai commented 11 months ago

Description

Extend #111 + #110 and combine the logic of #112 where the same bootstrap_nodered.yml playbook can install nodes (komponist + user-specific from nodes).

  1. use ansible playbook tags to offer user whether they want to download the tarballs offline
  2. generate the nodes.json with all nodes (komponist + user-specific)
shantanoo-desai commented 11 months ago

Notes

The only way that currently seems to be wrapping a command module with curl:


    - name: upload tarballs for Node-RED
      ansible.builtin.command:
        cmd: >
          curl -s -XPOST http://localhost/nodered/nodes -H "Content-Type: multipart/form-data" \
           -H "Authorization: {{ auth_token.json.token_type }} {{ auth_token.json.access_token }}" \
           -F "tarball=@{{ komponist.deploy_dir }}/nodered/{{ item }};type=application/gzip;filename={{ item }}"
      with_items:
        - node-red-contrib-influxdb-0.6.1.tgz