From e131b9dfd3245626ccb2daaac8404a2bed7659af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=86=E7=A7=8B=E6=96=87?= Date: Sat, 19 Nov 2022 14:29:29 +0000 Subject: [PATCH] hotfix for the dnf broken caused by installing libnsl --- .../container-tools-install/tasks/main.yml | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/ansible/roles/container-tools-install/tasks/main.yml b/ansible/roles/container-tools-install/tasks/main.yml index 4a1ff456..6f2d4e33 100644 --- a/ansible/roles/container-tools-install/tasks/main.yml +++ b/ansible/roles/container-tools-install/tasks/main.yml @@ -1,3 +1,13 @@ +- name: "update all" + yum: + name: '*' + conf_file: "{{ rpm_repo_config_path }}" + state: latest + +- name: "hotfix for dnf broken" + shell: + cmd: "dnf upgrade --refresh rpm glibc && rm /var/lib/rpm/.rpm.lock && dnf upgrade dnf" + - name: "install tcpdump" yum: name: tcpdump @@ -10,12 +20,6 @@ conf_file: "{{ rpm_repo_config_path }}" state: present -- name: "install libnsl" - yum: - name: libnsl - conf_file: "{{ rpm_repo_config_path }}" - state: present - - name: "install iproute" yum: name: iproute @@ -76,10 +80,17 @@ conf_file: "{{ rpm_repo_config_path }}" state: present +- name: "install libnsl" + yum: + name: libnsl + conf_file: "{{ rpm_repo_config_path }}" + state: present + - name: "install perf" yum: name: perf conf_file: "{{ rpm_repo_config_path }}" state: present + releasever: 8.6