Blueforce-Linux/ansible/playbooks/bf-package-check.yml
emirhanmamak-blueforce 503f4df2ae Enhance WireGuard restart playbook with operation wave validation
- Updated `bf-wireguard-restart.yml` to include dynamic host targeting based on `operation_wave`.
- Added pre-tasks to assert that the operation wave is approved and confirmed, ensuring proper execution context.
- Modified the service restart task to use a more structured command format.
- Adjusted `operations.py` and `ui_gui.py` to reflect changes in operation scope from "simple" to "wave" for relevant operations.
- Improved UI handling in `ui_gui.py` and `ui_surfaces.py` for better output management and user interaction.
- Updated log rotation configuration to target specific log files.
- Enhanced systemd service configurations for WireGuard to improve restart behavior.
- Refined firstboot scripts to ensure proper handling of dealer ID and state management.
- Improved error handling and rollback mechanisms in identity and installation scripts.
2026-09-17 17:06:58 +03:00

28 lines
1.1 KiB
YAML

---
# Report installed versions of pinned packages (read-only).
# Run: ansible-playbook -i inventory/hosts.yml playbooks/bf-package-check.yml --limit lab
# Package list overridable: -e "check_packages=['docker-ce','wireguard']".
# No Semaphore Pro feature is used.
- name: Check installed package versions
hosts: blueforce
gather_facts: false
become: true
vars:
check_packages:
- docker-ce
- wireguard
- rustdesk
tasks:
- name: Query package versions
# failed_when:false is deliberate: this read-only report tolerates unknown
# package names (dpkg-query still prints the entries it finds). argv form
# passes every name as a separate argument, so no shell joining occurs.
ansible.builtin.command:
argv: "{{ ['dpkg-query', '-W', '-f=${Package} ${Version}\n'] + check_packages }}"
register: pkg_out
changed_when: false
failed_when: false
- name: Show package versions
ansible.builtin.debug:
msg: "{{ inventory_hostname }}:\n{{ pkg_out.stdout | default('(query failed)') }}"