Skip to content

Commit

Permalink
Merge pull request #107 from OpenVoiceOS/feat/hivemind_identity
Browse files Browse the repository at this point in the history
[ansible/venv|docker] Create hivemind's _identity.json file
  • Loading branch information
goldyfruit authored Jul 12, 2024
2 parents cea38d5 + 1be5108 commit 89366c4
Show file tree
Hide file tree
Showing 4 changed files with 32 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
18 changes: 18 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,24 @@
tags:
- always

- name: Generate _identity.json
become: true
become_user: "{{ ovos_installer_user }}"
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:
PATH: "{{ ovos_installer_user_home }}/.venvs/ovos/bin"
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 89366c4

Please sign in to comment.