Why Am I Getting "SyntaxError: invalid syntax" For Some Remote Hosts While Using Ansible ?

Solution Verified - Updated -


I'm executing a playbook and some hosts are returning a similar error like below:

  File \"/apath/.ansible/tmp/ansible-tmp-1589371940.34-147349447418813\", line 39\r\n    with open(module, 'wb') as f:\r\n            ^\r\nSyntaxError: invalid syntax\r\n"


Ansible Engine 2.7+

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In