在执行ansible palybook时出现了以下报错:
"changed": false,
"module_stderr": "Shared connection to 192.168.166.85 closed.\r\n",
"module_stdout": " File \"/root/.ansible/tmp/ansible-tmp-1557400333.44-113544688602620/AnsiballZ_stat.py\", line 40\r\n with open(module, 'wb') as f:\r\n ^\r\nSyntaxError: invalid syntax\r\n",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
"rc": 1
后来查了一下发现target machine的python版本是2.4,需要升级到2.7,否则就会出现语法错误。