diff options
author | Christian Pointner <equinox@spreadspace.org> | 2020-08-20 00:52:52 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2020-08-20 00:52:52 +0200 |
commit | 7d134001fe95c0ee5e798f2d7cfd27162b76dd8c (patch) | |
tree | bbe520531c7e8637c8c6c0ad83b9f86a70d7617e /roles/streaming/rtmp/streamer/tasks | |
parent | move blackmagic desktopvideo role (diff) |
add new rtmp streamer role
Diffstat (limited to 'roles/streaming/rtmp/streamer/tasks')
-rw-r--r-- | roles/streaming/rtmp/streamer/tasks/main.yml | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/roles/streaming/rtmp/streamer/tasks/main.yml b/roles/streaming/rtmp/streamer/tasks/main.yml new file mode 100644 index 00000000..828ceba6 --- /dev/null +++ b/roles/streaming/rtmp/streamer/tasks/main.yml @@ -0,0 +1,30 @@ +--- +- name: create rtmp-streamer scripts subdirectories + file: + path: "{{ rtmp_streamer_base_path }}/{{ rtmp_streamer_inst_name }}" + state: directory + +- name: generate nginx config + template: + src: nginx.conf.j2 + dest: "{{ rtmp_streamer_base_path }}/{{ rtmp_streamer_inst_name }}/nginx.conf" + +- name: generate streamer config + copy: + content: "{{ rtmp_streamer_config | combine({'rtmp_base_url': 'rtmp://127.0.0.1/'+rtmp_streamer_app_name}) | to_nice_yaml }}\n" + dest: "{{ rtmp_streamer_base_path }}/{{ rtmp_streamer_inst_name }}/config.yml" + +- name: install pod manifest + vars: + kubernetes_standalone_pod: + name: "rtmp-streamer-{{ rtmp_streamer_inst_name }}" + spec: "{{ lookup('template', 'pod-spec.yml.j2') }}" + config_hash_items: + - path: "{{ rtmp_streamer_base_path }}/{{ rtmp_streamer_inst_name }}/nginx.conf" + properties: + - checksum + - path: "{{ rtmp_streamer_base_path }}/{{ rtmp_streamer_inst_name }}/config.yml" + properties: + - checksum + include_role: + name: kubernetes/standalone/pod |