base: Make sure python dnf bindings are installed
This commit is contained in:
parent
fa7402a8eb
commit
9a5cd91532
1 changed files with 19 additions and 0 deletions
|
@ -3,6 +3,25 @@
|
|||
ansible.builtin.hostname:
|
||||
name: "{{ inventory_hostname }}"
|
||||
|
||||
- name: Check if dnf python bindings are installed
|
||||
ansible.builtin.command:
|
||||
argv:
|
||||
- rpm
|
||||
- "-q"
|
||||
- python3-dnf
|
||||
register: result
|
||||
failed_when: false
|
||||
changed_when: false
|
||||
|
||||
- name: Install dnf python bindings
|
||||
ansible.builtin.command:
|
||||
argv:
|
||||
- dnf
|
||||
- install
|
||||
- "-y"
|
||||
- python3-dnf
|
||||
when: result.rc != 0
|
||||
|
||||
- name: Install OS specific roles for physical hardware
|
||||
ansible.builtin.include_role:
|
||||
name: cpupower
|
||||
|
|
Loading…
Add table
Reference in a new issue