[英]Troubles with ansible dnf install local rpm
我想安裝本地rpm軟件包。 在一種情況下,它運作良好
- name: Atom text editor
dnf: name="/mnt/temp/Inbox/Soft/Atom editor/atom-1.18.0-x86_64.rpm"
when: ansible_os_family == "RedHat" and ansible_pkg_mgr == "dnf"
tags: [packages, work, txt, atom]
對於其他轉速,它會引發錯誤
- name: wine-launcher-creator
dnf: name="/mnt/warehous/Warehouse/Linux/rpm/wine-launcher-creator-1.0.8-2.noarch.rpm"
when: ansible_os_family == "RedHat" and ansible_pkg_mgr == "dnf"
tags: [packages, env, work, wine]
錯誤
TASK [wine-launcher-creator] ***************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: dnf.exceptions.Error: <exception str() failed>
fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "module_stderr": "Traceback (most recent call last):\n File \"/tmp/ansible_TaYSEN/ansible_module_dnf.py\", line 355, in <module>\n main()\n File \"/tmp/ansible_TaYSEN/ansible_module_dnf.py\", line 349, in main\n ensure(module, base, params['state'], params['name'])\n File \"/tmp/ansible_TaYSEN/ansible_module_dnf.py\", line 304, in ensure\n base.do_transaction()\n File \"/usr/lib/python2.7/site-packages/dnf/base.py\", line 591, in do_transaction\n self._trans_error_summary(errstring))\ndnf.exceptions.Error: <exception str() failed>\n", "module_stdout": "", "msg": "MODULE FAILURE", "rc": 0}
我不明白這是什么問題。
權限所有者和SElinux屬性是相同的。
我試圖將麻煩的rpm移至與工作(/ mnt / temp / Inbox / Test /)相同的文件系統,但未成功。
感謝@kfreezy的好主意。
默認情況下,LANG = ru_RU.UTF8。 Ansible 2.3.0無法顯示Cyrilic語言錯誤。 錯誤消息剛剛被忽略。 更改為LANG = C以英文顯示完整的錯誤消息。
最好嘗試完成安裝過程。 運行時錯誤可能在過程的任何階段發生。
UPD:
Ansible 2.4允許為模塊設置語言環境,默認情況下為set
module_lang = C
因此(1)已過時。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.