Skip to content

Commit 079652e

Browse files
authored
Merge pull request #350 from OpenVoiceOS/fix/ansible_lint
[linting] Fix ansible-lint error
2 parents d078203 + f25051e commit 079652e

File tree

31 files changed

+482
-606
lines changed

31 files changed

+482
-606
lines changed

.github/workflows/scenarios-ubuntu2404.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ jobs:
2121
2222
- name: Uninstall existing instance
2323
run: |
24-
sh -c "curl -s https://raw.githubusercontent.com/OpenVoiceOS/ovos-installer/main/installer.sh -o installer.sh && chmod +x installer.sh && sudo ./installer.sh -u"
24+
curl -s https://raw.githubusercontent.com/OpenVoiceOS/ovos-installer/main/installer.sh -o installer.sh
25+
chmod +x installer.sh
26+
sudo ./installer.sh -u
2527
2628
- name: Scenario containers, development, ovos, skills
2729
run: |
@@ -40,4 +42,6 @@ jobs:
4042
share_telemetry: false
4143
share_usage_telemetry: false
4244
EOF
43-
sh -c "curl -s https://raw.githubusercontent.com/OpenVoiceOS/ovos-installer/main/installer.sh -o installer.sh && chmod +x installer.sh && sudo ./installer.sh"
45+
curl -s https://raw.githubusercontent.com/OpenVoiceOS/ovos-installer/main/installer.sh -o installer.sh
46+
chmod +x installer.sh
47+
sudo ./installer.sh

.github/workflows/sync_tx.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,14 @@ jobs:
1919
uses: actions/setup-python@v4
2020
with:
2121
python-version: 3.9
22-
2322
- name: Run script if manual dispatch
2423
if: github.event_name == 'workflow_dispatch'
2524
run: |
2625
python scripts/sync_translations.py
27-
2826
- name: Run script if merged by gitlocalize-app[bot]
2927
if: github.event_name == 'push' && github.event.head_commit.author.username == 'gitlocalize-app[bot]'
3028
run: |
3129
python scripts/sync_translations.py
32-
3330
- name: Commit to main
3431
uses: stefanzweifel/git-auto-commit-action@v4
3532
with:

ansible/roles/ovos_hardware_mark1/handlers/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88

99
- name: Set Reboot
1010
ansible.builtin.set_fact:
11-
ovos_installer_reboot: true
11+
ovos_installer_reboot: true # noqa var-naming

ansible/roles/ovos_hardware_mark1/tasks/config.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
- name: Check for /boot/firmware directory
33
ansible.builtin.stat:
44
path: /boot/firmware
5-
register: _boot_config_status
5+
register: ovos_hardware_mark1_boot_config_status
66

7-
- name: Set _boot_directory fact
7+
- name: Set ovos_hardware_mark1_boot_directory fact
88
ansible.builtin.set_fact:
9-
_boot_directory: "{{ '/boot/firmware' if _boot_config_status.stat.exists | bool else '/boot' }}"
9+
ovos_hardware_mark1_boot_directory: "{{ '/boot/firmware' if ovos_hardware_mark1_boot_config_status.stat.exists | bool else '/boot' }}"
1010

1111
- name: Manage TTY and soundcard overlays
1212
ansible.builtin.lineinfile:
@@ -20,7 +20,7 @@
2020

2121
- name: Disable snd_bcm2835 audio interface
2222
ansible.builtin.lineinfile:
23-
path: "{{ _boot_directory }}/config.txt"
23+
path: "{{ ovos_hardware_mark1_boot_directory }}/config.txt"
2424
regexp: "^{{ item.key }}="
2525
line: "{{ item.key }}={{ item.value }}"
2626
notify: Set Reboot
@@ -29,7 +29,7 @@
2929

3030
- name: Redirect console to tty1 only
3131
ansible.builtin.replace:
32-
path: "{{ _boot_directory }}/cmdline.txt"
32+
path: "{{ ovos_hardware_mark1_boot_directory }}/cmdline.txt"
3333
regexp: '\bconsole=serial0,115200\b\s?'
3434
replace: ""
3535
notify: Set Reboot

ansible/roles/ovos_hardware_mark1/tasks/prepare.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
- name: Add {{ ovos_installer_user }} to dialout group
2+
- name: Add installer user to dialout group
33
ansible.builtin.user:
44
name: "{{ ovos_installer_user }}"
55
groups: dialout
@@ -16,7 +16,7 @@
1616
- "{{ ovos_installer_user_home }}/.config/systemd/user"
1717
- "{{ _ovos_hardware_mark1_workind_directory }}"
1818

19-
- name: Configure initialize.sh to {{ _ovos_hardware_mark1_workind_directory }}
19+
- name: Configure initialize.sh in work directory
2020
ansible.builtin.copy:
2121
src: initialize.sh
2222
dest: "{{ _ovos_hardware_mark1_workind_directory }}/initialize.sh"

ansible/roles/ovos_hardware_mark2/handlers/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414

1515
- name: Set Reboot
1616
ansible.builtin.set_fact:
17-
ovos_installer_reboot: true
17+
ovos_installer_reboot: true # noqa var-naming

ansible/roles/ovos_hardware_mark2/meta/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,5 @@ galaxy_info:
2525
- mark2
2626

2727
dependencies: []
28+
collections:
29+
- moreati.uv

ansible/roles/ovos_hardware_mark2/tasks/firmware.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
- name: Update EEPROM
1515
ansible.builtin.command:
1616
cmd: rpi-eeprom-update -a
17-
register: _eeprom_status
17+
register: ovos_hardware_mark2_eeprom_status
1818
changed_when: false
1919

20-
- name: Set ovos_installer_reboot fact (EEPROM)
20+
- name: Set ovos_hardware_mark2_reboot fact (EEPROM)
2121
vars:
22-
_eeprom_reboot: "{{ _eeprom_status.stdout | regex_search('reboot') }}"
22+
ovos_hardware_mark2_eeprom_reboot: "{{ ovos_hardware_mark2_eeprom_status.stdout | regex_search('reboot') }}"
2323
ansible.builtin.set_fact:
24-
ovos_installer_reboot: true
25-
when: _eeprom_status is defined and _eeprom_reboot | length > 0
24+
ovos_installer_reboot: true # noqa var-naming
25+
when: ovos_hardware_mark2_eeprom_status is defined and ovos_hardware_mark2_eeprom_reboot | length > 0

ansible/roles/ovos_hardware_mark2/tasks/prepare.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
- name: Check for /boot/firmware directory
1515
ansible.builtin.stat:
1616
path: /boot/firmware
17-
register: _boot_config_status
17+
register: ovos_hardware_mark2_boot_config_status
1818

19-
- name: Set _boot_directory fact
19+
- name: Set ovos_hardware_mark2_boot_directory fact
2020
ansible.builtin.set_fact:
21-
_boot_directory: "{{ '/boot/firmware' if _boot_config_status.stat.exists | bool else '/boot' }}"
21+
ovos_hardware_mark2_boot_directory: "{{ '/boot/firmware' if ovos_hardware_mark2_boot_config_status.stat.exists | bool else '/boot' }}"

ansible/roles/ovos_hardware_mark2/tasks/vocalfusion.yml

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,21 @@
2222
- sj201-rev10-pwm-fan-overlay
2323

2424
- name: Manage sj201, buttons and PWM overlays
25-
vars:
26-
_is_rpi5: "{{ '-pi5' if 'Raspberry Pi 5' in ovos_installer_raspberrypi else '' }}"
2725
ansible.builtin.lineinfile:
28-
path: "{{ _boot_directory }}/config.txt"
26+
path: "{{ ovos_hardware_mark2_boot_directory }}/config.txt"
2927
regexp: "^{{ item }}="
30-
line: "{{ item }}{{ _is_rpi5 }}"
28+
line: "{{ item }}{{ '-pi5' if 'Raspberry Pi 5' in ovos_installer_raspberrypi else '' }}"
3129
loop:
3230
- dtoverlay=sj201
3331
- dtoverlay=sj201-buttons-overlay
3432
- dtoverlay=sj201-rev10-pwm-fan-overlay
3533

3634
- name: Build vocalfusion-soundcard.ko kernel module
3735
ansible.builtin.shell:
38-
cmd: |
39-
sudo make -j {{ ansible_processor_count }} KDIR=/lib/modules/{{ ansible_kernel }}/build all
36+
cmd: >
37+
sudo make -j {{ ansible_processor_count }}
38+
KDIR=/lib/modules/{{ ansible_kernel }}/build
39+
all
4040
executable: /bin/bash
4141
chdir: "{{ _ovos_hardware_mark2_vocalfusion_src_path }}/driver"
4242
changed_when: false
@@ -61,7 +61,7 @@
6161
group: root
6262
mode: "0644"
6363

64-
- name: Create {{ ovos_installer_user_home }}/.venvs/sj201 Python
64+
- name: Create sj201 Python virtualenv
6565
moreati.uv.pip:
6666
name:
6767
- Adafruit-Blinka
@@ -79,18 +79,14 @@
7979
group: root
8080
mode: "0755"
8181
loop:
82-
- {
83-
"url": "https://raw.githubusercontent.com/OpenVoiceOS/ovos-buildroot/0e464466194f58553af11c34f7435dba76ec70a3/buildroot-external/package/vocalfusion/xvf3510-flash",
84-
"dest": "xvf3510-flash",
85-
}
86-
- {
87-
"url": "https://raw.githubusercontent.com/OpenVoiceOS/ovos-buildroot/c67d7f0b7f2a3eff5faab96d6adf7495e9b48b93/buildroot-external/package/vocalfusion/app_xvf3510_int_spi_boot_v4_2_0.bin",
88-
"dest": "app_xvf3510_int_spi_boot_v4_2_0.bin",
89-
}
90-
- {
91-
"url": "https://raw.githubusercontent.com/MycroftAI/mark-ii-hardware-testing/main/utils/init_tas5806.py",
92-
"dest": "init_tas5806",
93-
}
82+
- url: >-
83+
https://raw.githubusercontent.com/OpenVoiceOS/ovos-buildroot/0e464466194f58553af11c34f7435dba76ec70a3/buildroot-external/package/vocalfusion/xvf3510-flash
84+
dest: xvf3510-flash
85+
- url: >-
86+
https://raw.githubusercontent.com/OpenVoiceOS/ovos-buildroot/c67d7f0b7f2a3eff5faab96d6adf7495e9b48b93/buildroot-external/package/vocalfusion/app_xvf3510_int_spi_boot_v4_2_0.bin
87+
dest: app_xvf3510_int_spi_boot_v4_2_0.bin
88+
- url: https://raw.githubusercontent.com/MycroftAI/mark-ii-hardware-testing/main/utils/init_tas5806.py
89+
dest: init_tas5806
9490

9591
- name: Copy SJ201 systemd unit file
9692
ansible.builtin.template:
@@ -113,7 +109,7 @@
113109
force: true
114110
scope: user
115111

116-
- name: Delete {{ _ovos_hardware_mark2_vocalfusion_src_path }} once compiled
112+
- name: Delete vocalfusion source once compiled
117113
ansible.builtin.file:
118114
path: "{{ _ovos_hardware_mark2_vocalfusion_src_path }}"
119115
state: absent

0 commit comments

Comments
 (0)