mirror of
https://gitlab.com/signalytic/platform-v2/experiments/node-config/common.git
synced 2026-09-11 17:51:30 +00:00
30 lines
822 B
YAML
30 lines
822 B
YAML
- name: Extract power-management package
|
|
ansible.builtin.unarchive:
|
|
src: packages/power-management-v11.tar.bz2
|
|
dest: /tmp
|
|
remote_src: false
|
|
become: true
|
|
|
|
- name: Find the top-level extracted directory
|
|
ansible.builtin.find:
|
|
paths: /tmp
|
|
file_type: directory
|
|
recurse: false
|
|
patterns: "power-management-*"
|
|
register: extracted_dir
|
|
become: true
|
|
|
|
- name: Fail if the archive layout is unexpected
|
|
ansible.builtin.assert:
|
|
that:
|
|
- extracted_dir.matched == 1
|
|
fail_msg: >-
|
|
Expected exactly one power-management-* directory in /tmp,
|
|
found {{ extracted_dir.matched }}. Check the archive structure.
|
|
|
|
- name: Run the install script from the top-level directory
|
|
ansible.builtin.command:
|
|
cmd: ./install.sh
|
|
chdir: "{{ extracted_dir.files[0].path }}"
|
|
become: true
|