--- - name: prepare rtmp-streamer storage volume when: streamer_rtmp_storage is defined vars: storage_volume: "{{ streamer_rtmp_storage | combine({'dest': streamer_rtmp_base_path}) }}" include_role: name: "storage/{{ streamer_rtmp_storage.type }}/volume" - name: create rtmp-streamer instance directory file: path: "{{ streamer_rtmp_base_path }}/{{ streamer_rtmp_inst_name }}" state: directory - name: generate nginx config template: src: nginx.conf.j2 dest: "{{ streamer_rtmp_base_path }}/{{ streamer_rtmp_inst_name }}/nginx.conf" - name: generate streamer config copy: content: "{{ streamer_rtmp_config | combine({'rtmp': {'target': 'rtmp://127.0.0.1/'+streamer_rtmp_app_name}}) | to_nice_yaml }}\n" dest: "{{ streamer_rtmp_base_path }}/{{ streamer_rtmp_inst_name }}/config.yml" - name: create recording directory when: streamer_rtmp_recording is defined file: path: "{{ streamer_rtmp_base_path }}/{{ streamer_rtmp_inst_name }}/recordings" state: directory owner: app group: app - name: install pod manifest vars: kubernetes_standalone_pod: name: "rtmp-streamer-{{ streamer_rtmp_inst_name }}" spec: "{{ lookup('template', 'pod-spec.yml.j2') }}" config_hash_items: - path: "{{ streamer_rtmp_base_path }}/{{ streamer_rtmp_inst_name }}/nginx.conf" properties: - checksum - path: "{{ streamer_rtmp_base_path }}/{{ streamer_rtmp_inst_name }}/config.yml" properties: - checksum include_role: name: kubernetes/standalone/pod