Skip to content

Commit

Permalink
[ansible/conf] Handles venv and docker
Browse files Browse the repository at this point in the history
  • Loading branch information
goldyfruit committed Oct 10, 2024
1 parent 33fa149 commit 92198b6
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 12 deletions.
7 changes: 7 additions & 0 deletions ansible/roles/ovos_installer/tasks/docker/composer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@
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") }}
when: ovos_installer_profile == "satellite"

- name: Run ovos-config for auto-configuration of STT and TTS based on language
become: true
become_user: "{{ ovos_installer_user }}"
community.docker.docker_container_exec:
container: ovos_cli
command: ovos-config autoconfigure --lang {{ ovos_installer_locale }} --male

- name: Block uninstall composer
when: ovos_installer_cleaning | bool
tags:
Expand Down
12 changes: 0 additions & 12 deletions ansible/roles/ovos_installer/tasks/ovos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,3 @@
mode: "0600"
backup: true
register: _configuration

- name: Run ovos-config autoconfigure in venv
vars:
lang_code: "{{ config_language_code }}"
gender: "{{ config_gender }}"
mode: "{{ config_mode }}"
shell: |
source {{ ovos_installer_user_home }}/.venv/bin/activate
ovos-config autoconfigure --lang {{ lang_code }} --{{ gender }} --{{ mode }}
args:
executable: /bin/bash
when: config_autoconfig == "true"
14 changes: 14 additions & 0 deletions ansible/roles/ovos_installer/tasks/virtualenv/venv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,20 @@
changed_when: false
when: ovos_installer_profile == "satellite"

- name: Run ovos-config for auto-configuration of STT and TTS based on language
become: true
become_user: "{{ ovos_installer_user }}"
ansible.builtin.shell:
cmd: |
ovos-config autoconfigure \
--lang {{ ovos_installer_locale }} \
--male
executable: /bin/bash
environment:
PATH: "{{ ovos_installer_user_home }}/.venvs/ovos/bin"
VIRTUAL_ENV: "{{ ovos_installer_user_home }}/.venvs/ovos"
changed_when: false

- 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

0 comments on commit 92198b6

Please sign in to comment.