diff --git a/ansible/ansible.cfg b/ansible/ansible.cfg index 50dd8b4d..280d2213 100644 --- a/ansible/ansible.cfg +++ b/ansible/ansible.cfg @@ -3,6 +3,7 @@ host_key_checking = False localhost_warning = False callbacks_enabled = ansible.posix.profile_tasks force_handlers = True +log_path = /var/log/ovos-ansible.log [ssh_connection] pipelining = True diff --git a/ansible/requirements.yml b/ansible/requirements.yml index 85987471..b3ba66d3 100644 --- a/ansible/requirements.yml +++ b/ansible/requirements.yml @@ -6,3 +6,5 @@ collections: version: 3.7.0 - name: community.general version: 8.3.0 + - name: kewlfft.aur + version: 0.11.1 diff --git a/ansible/roles/ovos_installer/tasks/virtualenv/packages.yml b/ansible/roles/ovos_installer/tasks/virtualenv/packages.yml index 344014cb..3d911579 100644 --- a/ansible/roles/ovos_installer/tasks/virtualenv/packages.yml +++ b/ansible/roles/ovos_installer/tasks/virtualenv/packages.yml @@ -76,14 +76,11 @@ state: "{{ ovos_installer_uninstall }}" when: ansible_os_family == "Suse" -# Package on Archlinux OS family will not be uninstalled as it might -# break the system... - name: Handle virtualenv package requirements (ovos/hivemind) community.general.pacman: name: - base-devel - swig - - fann - alsa-lib - portaudio - mpg123 @@ -94,3 +91,11 @@ - openblas state: "{{ ovos_installer_uninstall }}" when: ansible_os_family == "Archlinux" + +- name: Handle fann package from AUR (Arch based only) + become: true + become_user: "{{ ovos_installer_user }}" + kewlfft.aur.aur: + name: fann + use: makepkg + when: ansible_os_family == "Archlinux" diff --git a/setup.sh b/setup.sh index 9a890d6c..c97f7cfa 100755 --- a/setup.sh +++ b/setup.sh @@ -81,7 +81,7 @@ echo "➤ Starting Ansible playbook... ☕🍵🧋" export ANSIBLE_CONFIG=ansible/ansible.cfg export ANSIBLE_PYTHON_INTERPRETER="$VENV_PATH/bin/python3" export ANSIBLE_NOCOWS=1 -unbuffer ansible-playbook -i 127.0.0.1, ansible/site.yml \ +ansible-playbook -i 127.0.0.1, ansible/site.yml \ -e "ovos_installer_user=${RUN_AS}" \ -e "ovos_installer_group=$(id -ng "$RUN_AS")" \ -e "ovos_installer_uid=${RUN_AS_UID}" \ @@ -107,7 +107,10 @@ unbuffer ansible-playbook -i 127.0.0.1, ansible/site.yml \ -e "ovos_installer_locale=${LOCALE:-en-us}" \ -e "ovos_installer_i2c_devices=$(jq -c -n '$ARGS.positional' --args "${DETECTED_DEVICES[@]}")" \ -e "ovos_installer_reboot_file_path=${REBOOT_FILE_PATH}" \ - "${ansible_tags[@]}" "${ansible_debug[@]}" | tee -a "$LOG_FILE" + "${ansible_tags[@]}" "${ansible_debug[@]}" + +# Concatenate Ansible log with installer log +cat $ANSIBLE_LOG_FILE >>$LOG_FILE # Retrieve the ansible-playbook status code before tee command and check for success or failure if [ "${PIPESTATUS[0]}" -eq 0 ]; then diff --git a/utils/constants.sh b/utils/constants.sh index fc3982b8..03a7bcd9 100644 --- a/utils/constants.sh +++ b/utils/constants.sh @@ -1,5 +1,6 @@ #!/bin/env bash +export ANSIBLE_LOG_FILE=/var/log/ovos-ansible.log export ATMEGA328P_SIGNATURE=":030000001E950F3B" export AVRDUDE_BINARY_PATH=/usr/local/bin/avrdude export AVRDUDE_BINARY_URL="https://artifacts.smartgic.io/avrdude/avrdude-aarch64"