Ansible: (翻译中并没有这个单词,查了下名字来源)Ansible这个词是美国科幻小说作家厄休拉·勒古恩(Ursula K. Le Guin)在她1966年的小说《罗卡农的世界》(Rocannon's World)中创造的。 在勒古恩的虚构宇宙中,ansible是一种假想的设备,能够跨越遥远的距离,甚至在星系之间进行瞬时或超光速通信。这个词本身被认为是answerable (可回答的)的缩写,反映了该设备能够立即传递响应的能力。
(.venv) ~/Downloads/ansible_quickstart
ansible myhosts -m ping -i inventory.ini
[WARNING]: Unhandled error in Python interpreter discovery for host 192.168.156.135: Expecting value: line 1 column 1 (char 0)
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: SyntaxError: future feature annotations is not defined
[WARNING]: Platform linux on host 192.168.156.135 is using the discovered Python interpreter at /usr/bin/python3, but future installation of another
Python interpreter could change the meaning of that path. See https://docs.ansible.com/ansible-
core/2.18/reference_appendices/interpreter_discovery.html for more information.
192.168.156.135 | FAILED! => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python3"
},
"changed": false,
"module_stderr": "Shared connection to 192.168.156.135 closed.\r\n",
"module_stdout": "Traceback (most recent call last):\r\n File \"/home/yangzheng/.ansible/tmp/ansible-tmp-1745373649.983315-56612-242030219447474/AnsiballZ_ping.py\", line 107, in <module>\r\n _ansiballz_main()\r\n File \"/home/yangzheng/.ansible/tmp/ansible-tmp-1745373649.983315-56612-242030219447474/AnsiballZ_ping.py\", line 99, in _ansiballz_main\r\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\r\n File \"/home/yangzheng/.ansible/tmp/ansible-tmp-1745373649.983315-56612-242030219447474/AnsiballZ_ping.py\", line 44, in invoke_module\r\n from ansible.module_utils import basic\r\n File \"<frozen importlib._bootstrap>\", line 971, in _find_and_load\r\n File \"<frozen importlib._bootstrap>\", line 951, in _find_and_load_unlocked\r\n File \"<frozen importlib._bootstrap>\", line 894, in _find_spec\r\n File \"<frozen importlib._bootstrap_external>\", line 1157, in find_spec\r\n File \"<frozen importlib._bootstrap_external>\", line 1131, in _get_spec\r\n File \"<frozen importlib._bootstrap_external>\", line 1112, in _legacy_get_spec\r\n File \"<frozen importlib._bootstrap>\", line 441, in spec_from_loader\r\n File \"<frozen importlib._bootstrap_external>\", line 544, in spec_from_file_location\r\n File \"/tmp/ansible_ping_payload_ed14h5pb/ansible_ping_payload.zip/ansible/module_utils/basic.py\", line 5\r\nSyntaxError: future feature annotations is not defined\r\n",
"msg": "MODULE FAILURE: No start of json char found\nSee stdout/stderr for the exact error",
"rc": 1
}