在Red Hat 8.3计算机上,我try 使用以下可解析代码:
- debug:
msg: "{{ lookup('dig', 'localhost') }}"
但我得到了一个错误:
TASK*****************************************
fatal: [demo.example.com]: FAILED! => {"msg": "An unhandled exception occurred while running the lookup plugin 'dig'. Error was a <class 'ansible.errors.AnsibleError'>, original message: The dig lookup requires the python 'dnspython' library and it is not installed"}
我想可能这lookup('dig')
个人没有找对地方...
不过,我想我确实安装了dnspython
台:
pip3 install dnspython --user
Requirement already satisfied: dnspython in /home/user/.local/lib/python3.6/site-packages
更多信息:
ansible --version
ansible [core 2.12.7]
python version = 3.8.3