Skip to content

Commit

Permalink
[ansible/venv|docker] Create hivemind's _identity.json file
Browse files Browse the repository at this point in the history
  • Loading branch information
goldyfruit committed Jul 12, 2024
1 parent cea38d5 commit 49ad24e
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 2 deletions.
13 changes: 13 additions & 0 deletions ansible/roles/ovos_installer/tasks/docker/composer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,19 @@
environment:
DOCKER_TIMEOUT: "900"

- name: Generate _identity.json
community.docker.docker_container_exec:
container: hivemind_cli
command: |
hivemind-client set-identity \
--key {{ ovos_installer_satellite_key }} \
--password {{ ovos_installer_satellite_password }} \
--host {{ ovos_installer_listener_host }} \
--port {{ ovos_installer_listener_port | default(5678) }} \
--siteid {{ ovos_installer_site_id | default("voice-sat-1") }}
changed_when: false
when: ovos_installer_profile == "satellite"

- name: Block uninstall composer
when: ovos_installer_cleaning | bool
tags:
Expand Down
15 changes: 15 additions & 0 deletions ansible/roles/ovos_installer/tasks/virtualenv/venv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,21 @@
tags:
- always

- name: Generate _identity.json
ansible.builtin.shell:
cmd: |
hivemind-client set-identity \
--key {{ ovos_installer_satellite_key }} \
--password {{ ovos_installer_satellite_password }} \
--host {{ ovos_installer_listener_host }} \
--port {{ ovos_installer_listener_port | default(5678) }} \
--siteid {{ ovos_installer_site_id | default("voice-sat-1") }}
executable: /bin/bash
environment:
VIRTUAL_ENV: "{{ ovos_installer_user_home }}/.venvs/ovos"
changed_when: false
when: ovos_installer_profile == "satellite"

- name: Remove {{ ovos_installer_user_home }}/.venvs/ovos Python virtualenv and requirements.txt files
ansible.builtin.file:
path: "{{ ovos_installer_user_home }}/.venvs/ovos"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Requires={{ _detect_sound_server.stdout }}.socket

[Service]
WorkingDirectory=%h/.venvs/ovos
ExecStart=%h/.venvs/ovos/bin/hivemind-voice-sat --key {{ ovos_installer_satellite_key }} --password {{ ovos_installer_satellite_password }} --host {{ ovos_installer_listener_host }} --port {{ ovos_installer_listener_port | default(5678) }}
ExecStart=%h/.venvs/ovos/bin/hivemind-voice-sat
ExecReload=/usr/bin/kill -s HUP $MAINPID
ExecStop=/usr/bin/kill -s KILL $MAINPID
Restart=on-failure
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ ovos-ww-plugin-openwakeword
{% if ovos_installer_cpu_is_capable | bool %}
ovos-ww-plugin-precise-lite
{% endif %}
poorman-handshake

# No PyPi release
git+https://github.com/JarbasHiveMind/HiveMind-voice-sat.git
Expand Down

0 comments on commit 49ad24e

Please sign in to comment.