Skip to content

[linting] Fix ansible-lint error#350

Merged
goldyfruit merged 5 commits intomainfrom
fix/ansible_lint
Nov 25, 2025
Merged

[linting] Fix ansible-lint error#350
goldyfruit merged 5 commits intomainfrom
fix/ansible_lint

Conversation

@goldyfruit
Copy link
Collaborator

@goldyfruit goldyfruit commented Oct 4, 2025

Summary by CodeRabbit

  • Bug Fixes

    • Improved installer reliability (fixed extraction/permissions) and safer sound config handling (better asoundrc backup/removal).
  • New Features

    • Added a feature flag to control inclusion of ggwave voice components.
  • Refactor

    • Standardized and renamed many installer/hardware variables and task names for consistent boot, firmware, audio/video, timezone, systemd, docker, virtualenv and tuning flows; test variables updated accordingly.
  • Chores

    • Installer script initializes Ansible flags to avoid unset-variable failures; CI workflow steps simplified/removed.

✏️ Tip: You can customize this high-level summary in your review settings.

@goldyfruit goldyfruit added this to the Prince of Persia milestone Oct 4, 2025
@goldyfruit goldyfruit self-assigned this Oct 4, 2025
@goldyfruit goldyfruit added the bug Something isn't working label Oct 4, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 4, 2025

Walkthrough

Renamed many registered variables and set_facts to role-prefixed names, refactored several loop/item structures and systemd/unit lists, introduced default flag ovos_installer_enable_ggwave, added a collection dependency for mark2, adjusted task names/permissions, and initialized ansible flags in setup.sh. No new runtime branches added.

Changes

Cohort / File(s) Summary
Boot path detection vars
ansible/roles/ovos_hardware_mark1/tasks/config.yml, ansible/roles/ovos_hardware_mark2/tasks/prepare.yml, ansible/roles/ovos_installer/tasks/tuning/io.yml, ansible/roles/ovos_installer/tasks/tuning/numa.yml
Renamed register and set_fact variables for /boot/firmware and boot directory checks to role-prefixed names (e.g., _boot_config_statusovos_*_boot_config_status, _boot_directory*_boot_directory) and updated path references.
Mark1/Mark2 reboot flags & handlers
ansible/roles/ovos_hardware_mark1/handlers/main.yml, ansible/roles/ovos_hardware_mark2/handlers/main.yml, ansible/roles/ovos_hardware_mark2/tasks/firmware.yml
Renamed EEPROM/registers in mark2 tasks, added role-specific reboot facts while preserving ovos_installer_reboot, and added inline # noqa var-naming comments on handler set_fact lines.
Installer configuration & finalize
ansible/roles/ovos_installer/tasks/ovos.yml, ansible/roles/ovos_installer/tasks/finalize.yml
Renamed _configurationovos_installer_configuration, _pip_confovos_installer_pip_conf; updated backup targets and directory lists, reorganized create-directory blocks, and replaced registers/conditional checks with role-prefixed names.
Sound and asoundrc changes
ansible/roles/ovos_installer/tasks/sound.yml, ansible/roles/ovos_installer/handlers/block-sound.yml
Renamed sound-related registers to ovos_installer_*, updated asoundrc generation to use new vars, standardized task names to "installer user", adjusted when conditions, added uninstall gating and updated handler conditions.
Timezone detection
ansible/roles/ovos_installer/tasks/timezone.yml
Renamed timezone register to ovos_installer_detected_timezone, set_fact uses .json.timezone, and added a rescue fallback setting timezone to UTC.
Video / DISPLAY detection
ansible/roles/ovos_installer/tasks/video.yml
Renamed Wayland/DISPLAY registers to ovos_installer_... variants and updated set_fact sources, existence checks, conditions and task naming.
Virtualenv: bus & systemd refactor
ansible/roles/ovos_installer/tasks/virtualenv/bus.yml, ansible/roles/ovos_installer/tasks/virtualenv/systemd.yml
Fixed Jinja spacing for rust bus URL; unarchive now sets mode/owner/group/remote_src. Replaced compact dict-driven systemd unit loops with explicit unit blocks, renamed systemd path/notify vars, and switched unit state handling to derive from ovos_installer_configuration.changed.
Docker / composer / compose files
ansible/roles/ovos_installer/tasks/docker/common.yml, ansible/roles/ovos_installer/tasks/docker/composer.yml, ansible/roles/ovos_installer/tasks/docker/setup-*.yml
Standardized task names, replaced inline loop dicts with YAML mappings, renamed composition variables (_composition_*ovos_installer_composition_*), updated docker_compose_v2 invocation registers/loops, and unified os_distribution usage to ovos_installer_os_distribution.
Virtualenv GUI/venv changes & templates
ansible/roles/ovos_installer/tasks/virtualenv/gui.yml, ansible/roles/ovos_installer/tasks/virtualenv/venv.yml, ansible/roles/ovos_installer/templates/virtualenv/*requirements*.j2
Converted inline loop dicts to YAML mappings, renamed registers (e.g., _ovos_install_venvovos_installer_install_venv), introduced ovos_installer_enable_ggwave flag and switched ggwave gating in templates from architecture-based to this flag; updated requirement inclusion logic.
Tuning: governor / io / numa
ansible/roles/ovos_installer/tasks/tuning/governor.yml, ansible/roles/ovos_installer/tasks/tuning/io.yml, ansible/roles/ovos_installer/tasks/tuning/numa.yml
Replaced community.general.zypper with ansible.builtin.package for SUSE, and renamed register variables for cpu/governor and boot checks to ovos_installer_*; updated dependent when conditions.
Hardware vocalfusion & mark2 tasks
ansible/roles/ovos_hardware_mark2/tasks/vocalfusion.yml, ansible/roles/ovos_hardware_mark2/tasks/firmware.yml
Updated config.txt/cmdline paths to use role-prefixed boot directory variables, computed -pi5 suffix inline, reflowed shell commands, simplified task names and register targets.
Role metadata & collection
ansible/roles/ovos_hardware_mark2/meta/main.yml
Added collection dependency: moreati.uv.
Work dir, permissions, and user tasks
ansible/roles/ovos_hardware_mark1/tasks/prepare.yml
Standardized user task naming, added append: true for group membership, removed obsolete directory creation, and set owner/group/mode on copied initialize.sh.
CI/workflows & scripts
.github/workflows/scenarios-ubuntu2404.yml, .github/workflows/sync_tx.yml, setup.sh
Replaced inline sh -c command strings with explicit multi-line steps, removed two sync_tx workflow steps, and initialized ansible flags in setup.sh to avoid unbound-variable errors.
Tests (molecule) renames
tests/molecule/ovos_installer/roles/test_ovos_installer/*
Test default variables renamed from ovos_installer_*test_ovos_installer_* and test tasks updated to use test-scoped variable names and paths.
Telemetry & assorted register renames
ansible/roles/ovos_installer/telemetry.yml, various ansible/roles/ovos_installer/tasks/*
Multiple register variable renames to ovos_installer_* across telemetry and other tasks; updated until/when conditions to new names.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Potential focus areas:

  • ansible/roles/ovos_installer/tasks/docker/composer.yml (new composition mapping shape and docker_compose_v2 usage)
  • ansible/roles/ovos_installer/tasks/virtualenv/systemd.yml (explicit unit blocks, state/notify changes)
  • Templates switching ggwave gating to ovos_installer_enable_ggwave (verify defaults and tests)
  • ansible/roles/ovos_hardware_mark2/meta/main.yml (collection dependency availability in CI)
  • Molecule test renames (ensure test variable injection still matches expectations)

Possibly related PRs

Poem

I twitch my whiskers at tidy names,
I hop through playbooks, mend the frames.
Facts get clearer, loops turn neat,
Permissions set and templates sweet.
A rabbit nods — deployment’s fleet. 🥕

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title '[linting] Fix ansible-lint error' is vague and does not specify which ansible-lint errors were fixed or what changes were made to resolve them. Replace with a more specific title that describes the actual changes, such as '[linting] Rename private variables to follow ansible-lint naming conventions' or similar, indicating the nature of the fixes.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/ansible_lint

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1d6e829 and b383684.

📒 Files selected for processing (1)
  • ansible/roles/ovos_installer/defaults/main.yml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • ansible/roles/ovos_installer/defaults/main.yml

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ac46146 and a3e317e.

📒 Files selected for processing (10)
  • ansible/roles/ovos_hardware_mark1/tasks/config.yml (1 hunks)
  • ansible/roles/ovos_hardware_mark2/tasks/firmware.yml (1 hunks)
  • ansible/roles/ovos_hardware_mark2/tasks/prepare.yml (1 hunks)
  • ansible/roles/ovos_installer/tasks/finalize.yml (2 hunks)
  • ansible/roles/ovos_installer/tasks/ovos.yml (1 hunks)
  • ansible/roles/ovos_installer/tasks/sound.yml (2 hunks)
  • ansible/roles/ovos_installer/tasks/timezone.yml (1 hunks)
  • ansible/roles/ovos_installer/tasks/video.yml (2 hunks)
  • ansible/roles/ovos_installer/tasks/virtualenv/bus.yml (1 hunks)
  • ansible/roles/ovos_installer/tasks/virtualenv/systemd.yml (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: ansible-lint
  • GitHub Check: ansible-lint

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
ansible/roles/ovos_installer/tasks/tuning/numa.yml (1)

11-20: Update variable references in three files to complete the refactoring.

Verification confirms undefined variable references that will cause runtime failures. The following files still reference the old _boot_directory variable which is no longer being set:

  • ansible/roles/ovos_hardware_mark2/tasks/touchscreen.yml (lines 4, 10)
  • ansible/roles/ovos_hardware_mark1/tasks/config.yml (line 13)

Update these to use the role-specific variable names: ovos_hardware_mark2_boot_directory and ovos_hardware_mark1_boot_directory respectively, consistent with the refactoring already completed in other files.

ansible/roles/ovos_hardware_mark1/tasks/config.yml (1)

13-13: Variable reference inconsistency: line 13 still uses old variable name.

Line 13 references {{ _boot_directory }}, but the variable was renamed to ovos_hardware_mark1_boot_directory at line 9. This will cause a template rendering error. Lines 23 and 32 were correctly updated to use the new variable name.

Apply this diff to fix the inconsistency:

 - name: Manage TTY and soundcard overlays
   ansible.builtin.lineinfile:
-    path: "{{ _boot_directory }}/config.txt"
+    path: "{{ ovos_hardware_mark1_boot_directory }}/config.txt"
     regexp: "^{{ item }}"
     line: "{{ item }}"
🧹 Nitpick comments (3)
setup.sh (1)

66-66: Redundant assignment: ansible_cleaning already initialized at line 26.

Line 66 reassigns ansible_cleaning="false", but the variable was already initialized with the same value at line 26. If the intention is to reset the value unconditionally in this branch, the comment is acceptable; otherwise, this assignment can be removed.

ansible/roles/ovos_installer/tasks/virtualenv/systemd.yml (1)

92-102: Confirm ovos_installer_configuration availability for systemd restart logic

ovos_installer_systemd_state derives from ovos_installer_configuration.changed, which assumes that ovos_installer_configuration is always defined before this task runs. If there is any code path where that register might be skipped, this could raise an undefined-variable error at runtime. Otherwise, the enable/start loop (including scopes, users, and per-profile state) looks sound.

If you expect some runs to skip the configuration task, consider guarding this task with a when: ovos_installer_configuration is defined or providing a default (| default(false)) in the expression to make it more robust.

Also applies to: 104-152

ansible/roles/ovos_installer/tasks/virtualenv/venv.yml (1)

32-38: Clarify CPU capability condition with parentheses

The two venv-creation tasks cleanly separate the “with tflite_runtime” and “without tflite_runtime” paths based on ovos_installer_cpu_is_capable. To avoid any ambiguity in Jinja filter precedence and make the intent explicit, the second when would be clearer with parentheses:

-  when: not ovos_installer_cpu_is_capable | bool
+  when: not (ovos_installer_cpu_is_capable | bool)

Functionally this should be equivalent, but the explicit grouping is easier to read and less error-prone.

Also applies to: 40-45

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a3e317e and 02b2bc8.

📒 Files selected for processing (31)
  • .github/workflows/scenarios-ubuntu2404.yml (2 hunks)
  • .github/workflows/sync_tx.yml (0 hunks)
  • ansible/roles/ovos_hardware_mark1/handlers/main.yml (1 hunks)
  • ansible/roles/ovos_hardware_mark1/tasks/config.yml (3 hunks)
  • ansible/roles/ovos_hardware_mark1/tasks/prepare.yml (2 hunks)
  • ansible/roles/ovos_hardware_mark2/handlers/main.yml (1 hunks)
  • ansible/roles/ovos_hardware_mark2/meta/main.yml (1 hunks)
  • ansible/roles/ovos_hardware_mark2/tasks/firmware.yml (1 hunks)
  • ansible/roles/ovos_hardware_mark2/tasks/prepare.yml (1 hunks)
  • ansible/roles/ovos_hardware_mark2/tasks/vocalfusion.yml (4 hunks)
  • ansible/roles/ovos_installer/defaults/main.yml (1 hunks)
  • ansible/roles/ovos_installer/tasks/docker/common.yml (2 hunks)
  • ansible/roles/ovos_installer/tasks/docker/composer.yml (5 hunks)
  • ansible/roles/ovos_installer/tasks/docker/setup-Debian.yml (3 hunks)
  • ansible/roles/ovos_installer/tasks/docker/setup-RedHat.yml (1 hunks)
  • ansible/roles/ovos_installer/tasks/ovos.yml (4 hunks)
  • ansible/roles/ovos_installer/tasks/sound.yml (5 hunks)
  • ansible/roles/ovos_installer/tasks/timezone.yml (1 hunks)
  • ansible/roles/ovos_installer/tasks/tuning/governor.yml (2 hunks)
  • ansible/roles/ovos_installer/tasks/tuning/io.yml (1 hunks)
  • ansible/roles/ovos_installer/tasks/tuning/numa.yml (1 hunks)
  • ansible/roles/ovos_installer/tasks/video.yml (3 hunks)
  • ansible/roles/ovos_installer/tasks/virtualenv/gui.yml (1 hunks)
  • ansible/roles/ovos_installer/tasks/virtualenv/systemd.yml (2 hunks)
  • ansible/roles/ovos_installer/tasks/virtualenv/venv.yml (4 hunks)
  • ansible/roles/ovos_installer/telemetry.yml (2 hunks)
  • ansible/roles/ovos_installer/templates/virtualenv/core-requirements.txt.j2 (1 hunks)
  • ansible/roles/ovos_installer/templates/virtualenv/skills-requirements.txt.j2 (1 hunks)
  • setup.sh (1 hunks)
  • tests/molecule/ovos_installer/roles/test_ovos_installer/defaults/main.yml (1 hunks)
  • tests/molecule/ovos_installer/roles/test_ovos_installer/tasks/configuration.yml (1 hunks)
💤 Files with no reviewable changes (1)
  • .github/workflows/sync_tx.yml
✅ Files skipped from review due to trivial changes (3)
  • ansible/roles/ovos_installer/tasks/tuning/io.yml
  • .github/workflows/scenarios-ubuntu2404.yml
  • ansible/roles/ovos_installer/tasks/virtualenv/gui.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • ansible/roles/ovos_installer/tasks/timezone.yml
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2024-09-25T01:36:33.089Z
Learnt from: Erotemic
Repo: OpenVoiceOS/ovos-installer PR: 151
File: utils/common.sh:295-302
Timestamp: 2024-09-25T01:36:33.089Z
Learning: Defaulting `USE_UV` to `true` is acceptable as it significantly speeds up installations in the OVOS installer.

Applied to files:

  • ansible/roles/ovos_installer/defaults/main.yml
🔇 Additional comments (42)
ansible/roles/ovos_installer/telemetry.yml (2)

13-14: ✓ Variable renaming and until condition properly updated.

The registered variable is consistently renamed to ovos_installer_isp_data and the until condition correctly references the new variable name.


30-31: ✓ Variable renaming and until condition properly updated.

The registered variable is consistently renamed to ovos_installer_push_telemetry_data and the until condition correctly references the new variable name.

setup.sh (1)

25-28: Good defensive initialization to prevent unbound-variable errors.

Initializing ansible_cleaning, ansible_tags, and ansible_debug early ensures these variables are always defined, preventing errors if set -u is later enabled or if conditional branches are skipped. The placement before the DEBUG check is correct, and the array syntax is proper for Bash.

ansible/roles/ovos_installer/tasks/video.yml (3)

2-9: Approve task name update and user group loop structure.

The task name simplification (removing templated {{ ovos_installer_user }}) aligns with ansible-lint best practices. However, the user module loop structure warrants verification: groups: audio is static while the loop iterates over video and render, which will add the user to the audio group once per iteration (redundantly).

Please verify via git diff whether this loop/groups pattern existed in the previous version or if it's a new structure introduced by this PR. If new, consider refactoring to:

- name: Add installer user to video and render groups
  ansible.builtin.user:
    name: "{{ ovos_installer_user }}"
    groups: "{{ item }}"
    append: true
  loop:
    - audio
    - video
    - render

31-46: Consistent variable renaming for wayland socket detection.

Renamed _ovos_wayland_displayovos_installer_ovos_wayland_display with all downstream references (lines 43, 45) properly updated. This naming convention aligns with ansible-lint recommendations for registered variable scoping and naming clarity.


48-80: Consistent variable renaming for DISPLAY server detection.

Renamed _ovos_display_server_numberovos_installer_ovos_display_server_number with all downstream references (lines 79–80) properly updated. The when condition correctly checks stdout | length > 0 to validate non-empty output.

ansible/roles/ovos_installer/tasks/sound.yml (3)

101-102: Reference to renamed variable correctly updated.

The .asoundrc generation task now correctly references ovos_installer_detect_sound_server on lines 101–102, maintaining the original logic for both pcm.!default and ctl.!default assignments.

Also applies to: 98-108


32-45: Task names simplified; logic preserved.

Task names have been updated from including the user variable (e.g., "Add {{ ovos_installer_user }} to audio group") to more generic phrasing ("Add installer user to audio group"). The when conditions remain logically intact, including the reformatted condition on lines 56–57 for the pipewire group task.

Also applies to: 47-62


110-116: Removal task now properly gated for uninstall scenarios.

The .asoundrc removal task now includes the when: ovos_installer_cleaning | bool condition and the uninstall tag, ensuring the file is only removed during cleanup operations.

ansible/roles/ovos_installer/tasks/tuning/numa.yml (2)

2-5: Variable naming refactor: boot config status register.

The register variable has been renamed from _boot_config_status to ovos_installer_boot_config_status, adopting an explicit namespace prefix instead of an underscore-only private scope convention. This aligns with Ansible best practices and the PR's linting fixes.


7-9: Variable naming refactor: boot directory fact.

The set_fact task correctly updates both the task name and variable assignment to use the new namespaced prefix ovos_installer_boot_directory. The conditional reference to ovos_installer_boot_config_status.stat.exists correctly matches the registered variable from line 5.

tests/molecule/ovos_installer/roles/test_ovos_installer/defaults/main.yml (1)

2-7: LGTM — Variable renaming is clean and consistent.

The renaming from ovos_installer_* to test_ovos_installer_* properly scopes these variables to the test role, avoiding potential conflicts with production installer variables.

tests/molecule/ovos_installer/roles/test_ovos_installer/tasks/configuration.yml (4)

10-17: Consistent variable usage and assertions for container configuration.

The assertions for the container config directory properly validate existence, type, ownership, and permissions using the updated variable names.


24-31: Consistent variable usage and assertions for container mycroft.conf.

The assertions for the configuration file properly validate existence (negating isdir), ownership, and stricter file permissions (0600) using the updated variable names.


41-48: Consistent variable usage and assertions for virtualenv configuration.

The assertions for the virtualenv config directory mirror the container block logic correctly with updated variable names.


55-62: Consistent variable usage and assertions for virtualenv mycroft.conf.

The assertions for the virtualenv configuration file properly validate all required properties using updated variable names.

ansible/roles/ovos_installer/tasks/tuning/governor.yml (2)

20-20: Module replacement looks appropriate for linting fix.

Switching from community.general.zypper to ansible.builtin.package is a valid linting improvement and reduces dependency on the community.general collection for this task. Verify that ansible.builtin.package handles SUSE package management correctly in your testing environment.


37-45: Variable renaming and references verified as correct.

Verification confirms that _ovos_installer_cpu_governor_config is properly defined in ansible/roles/ovos_installer/vars/main.yml (line 7) with the value /etc/default/cpu_governor. All references in the task file at lines 37 and 42 are correctly maintained. The variable renaming to ovos_installer_cpu_governor_config follows Ansible conventions and is consistently applied throughout.

ansible/roles/ovos_installer/templates/virtualenv/skills-requirements.txt.j2 (1)

7-9: GGwave skill inclusion correctly gated by new feature flag

ovos-skill-ggwave is now conditioned on ovos_installer_enable_ggwave and ovos_installer_profile != "server", which matches how the systemd unit is gated and centralizes the enable/disable logic in the flag. No issues spotted here.

ansible/roles/ovos_installer/defaults/main.yml (1)

12-12: ovos_installer_enable_ggwave default is well-scoped

The default for ovos_installer_enable_ggwave ties enablement to ovos_installer_channel in ['stable', 'testing'] and architectures in ['x86_64', 'aarch64']. This centralizes the previous architecture/channel gating cleanly. Looks good.

ansible/roles/ovos_installer/templates/virtualenv/core-requirements.txt.j2 (1)

24-26: Core ggwave plugin is correctly tied to ovos_installer_enable_ggwave

Switching the condition to ovos_installer_enable_ggwave keeps the logic in one place and matches the new flag semantics. No functional issues identified.

ansible/roles/ovos_installer/tasks/docker/setup-RedHat.yml (1)

4-12: RedHat Docker repo detection and permissions look correct

Using ovos_installer_os_distribution to choose between centos and fedora in the Docker repo URL is straightforward and keeps the logic in one place. Adding mode: "0644" for docker-ce.repo is appropriate for a repo file. No issues spotted.

ansible/roles/ovos_installer/tasks/docker/setup-Debian.yml (1)

4-5: Debian/Ubuntu Docker repo selection and repo stanza are consistent

ovos_installer_os_distribution cleanly distinguishes Debian ('debian') from everything else ('ubuntu'), and both the GPG key URL and apt_repository now use that variable. The multi-line repo string still produces a valid deb ... line. No problems found.

Also applies to: 15-19, 33-36

ansible/roles/ovos_installer/tasks/virtualenv/systemd.yml (2)

13-24: Systemd unit copy paths and notify scope are coherent

Using ovos_installer_systemd_path_user/ovos_installer_systemd_path_system to route units to the correct directories and deriving ovos_installer_notify_scope from item.user (Reload Systemd vs Reload Systemd User) is a clear improvement. The per-unit state expressions match the intended profiles/features, and when: item.state | bool is the right pattern for filtering the loop. No functional issues observed.

Also applies to: 25-87


168-203: Uninstall stop/disable loop change maintains behavior

The expanded stop/disable loop lists all relevant OVOS and HiveMind units explicitly with appropriate scope and user values. Combined with failed_when: ovos_installer_systemd_stop is not defined, this keeps the uninstall path tolerant of missing units. Behavior is consistent with the rest of the systemd handling.

ansible/roles/ovos_installer/tasks/virtualenv/venv.yml (5)

9-30: Requirements templating loop and per-profile gating look correct

The new loop structure with file/dest/state and when: item.state | bool cleanly drives which requirements files are rendered for each profile/feature (core, GUI, skills, extra-skills, listener, satellite, server). The destinations under /tmp align with the later install step and final cleanup. No issues here.


47-53: GGwave library installation is correctly tied to the enable flag

The moreati.uv.pip task for ggwave is guarded by when: ovos_installer_enable_ggwave | bool, which lines up with how the flag is defined in defaults and used in the requirements/templates. This looks consistent.


63-65: Install-venv retry loop and item gating are sound

Renaming the register variable to ovos_installer_install_venv and using until: ovos_installer_install_venv is success is clear. The loop over /tmp/*-requirements.txt with per-item state and when: item.state | bool correctly reuses the earlier profile/feature gating. The retry settings (5 retries, 5s delay) are reasonable.

Also applies to: 68-82


90-113: Venv ownership and .bashrc updates remain idempotent

Changing the task name for the chown operation and the .bashrc updates improves readability; the underlying use of changed_when: false and lineinfile with state: "{{ ovos_installer_uninstall }}" and i2c-based gating is consistent with the existing behavior. No issues identified.


160-176: Venv and requirements cleanup covers new /tmp files

The uninstall cleanup task now removes the ovos venv, all /tmp/*-requirements.txt files used earlier, device-specific paths under /opt, and the ovos-messagebus wrapper in the user’s local bin. This matches the new layout introduced above and keeps the system tidy on uninstall.

ansible/roles/ovos_installer/tasks/docker/common.yml (2)

2-7: Docker group membership task rename is fine

Renaming the task to “Add installer user to docker group” while keeping the ansible.builtin.user parameters unchanged improves clarity without affecting behavior. All good here.


27-35: Repository cloning conditions match expected profiles

The new loop items for cloning ovos-docker vs hivemind-docker with:

  • ovos-docker when ovos_installer_profile != 'satellite' or ovos_installer_cleaning | bool
  • hivemind-docker when ovos_installer_profile == 'satellite' or ovos_installer_cleaning | bool

and when: item.state | bool give the right behavior: only the relevant repo is cloned for normal installs, and both are available when cleaning. This looks correct.

ansible/roles/ovos_hardware_mark1/handlers/main.yml (1)

11-12: Expose role-specific reboot fact alongside legacy variable.

The addition of ovos_hardware_mark1_reboot follows proper Ansible naming conventions, while retaining ovos_installer_reboot with a noqa comment for backward compatibility. This dual approach is appropriate for a phased migration.

ansible/roles/ovos_hardware_mark1/tasks/prepare.yml (2)

2-6: Task name improved and group append mode added.

The task name is now clearer, and append: true correctly prevents group removal during user modification. Changes are appropriate.


19-25: Copy task properly configured with ownership and permissions.

Permissions and ownership are now explicitly set for the initialize.sh script. Verify that _ovos_hardware_mark1_workind_directory is defined in role defaults or variables (note: potential typo—"workind" vs. "working").

ansible/roles/ovos_hardware_mark2/tasks/prepare.yml (1)

17-21: Boot-directory variable consistently renamed with proper conditional.

Variables ovos_hardware_mark2_boot_config_status and ovos_hardware_mark2_boot_directory follow the role-prefixed naming convention and replace underscore-prefixed private variables. The conditional correctly references the new status variable.

ansible/roles/ovos_hardware_mark2/handlers/main.yml (1)

17-18: Role-specific reboot fact added with legacy variable retained.

Parallels the mark1 handler pattern: ovos_hardware_mark2_reboot (properly named) alongside legacy ovos_installer_reboot (with noqa comment). Appropriate for backward compatibility during migration.

ansible/roles/ovos_hardware_mark2/tasks/vocalfusion.yml (3)

26-26: Boot-directory variable updated consistently; inline conditional refactored.

Line 26 correctly uses ovos_hardware_mark2_boot_directory, and line 28 inlines the conditional logic previously computed in a vars block. Both changes maintain behavior while improving clarity.

Also applies to: 28-28


64-64: Task names simplified for clarity without functional change.

Lines 64 and 112 remove variable interpolation from task names, improving readability. No logic changes.

Also applies to: 112-112


75-89: YAML folded scalars verified—URLs parse correctly without newlines.

Verification confirms all URLs maintain single-line integrity with the folded scalar syntax (>-):

  • xvf3510-flash: 154 chars, single-line ✓
  • app_xvf3510_int_spi_boot_v4_2_0.bin: 176 chars, single-line ✓
  • init_tas5806: 95 chars, single-line ✓

Loop structure and destinations are correct.

ansible/roles/ovos_hardware_mark2/tasks/firmware.yml (1)

17-26: EEPROM-related variables consistently renamed with proper conditional evaluation.

Variables ovos_hardware_mark2_eeprom_status and ovos_hardware_mark2_eeprom_reboot replace underscore-prefixed private variables. All references—including the when condition at lines 25-26—correctly use the new names. The dual set_fact pattern (legacy ovos_installer_reboot + proper ovos_hardware_mark2_reboot) maintains backward compatibility.

ansible/roles/ovos_hardware_mark2/meta/main.yml (1)

28-29: Collection moreati.uv is available on Ansible Galaxy; verify Ansible version compatibility.

The moreati.uv collection is published to Ansible Galaxy with latest version 0.0.2 (released Dec 4, 2024). The role declares min_ansible_version: "2.12". Before merging, verify that moreati.uv v0.0.2 is compatible with your target Ansible version (≥2.12) and test the moreati.uv.pip module usage in your environment.

@goldyfruit goldyfruit added enhancement New feature or request and removed bug Something isn't working labels Nov 25, 2025
@goldyfruit goldyfruit merged commit 079652e into main Nov 25, 2025
7 checks passed
@goldyfruit goldyfruit deleted the fix/ansible_lint branch November 25, 2025 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant