How do I Prevent Import Errors when Calling Python3 in Shell/Command Tasks when Python2 is the Discovered Interpreter for Ansible Engine?

Solution Verified - Updated -

Issue

When calling python3 through the shell, command, or raw module, python3 returns import errors.

Environment

Control Host: Ansible Engine
Managed Host: Python2.7 and Python3

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In