Ansible fails with /bin/sh: 1: /usr/bin/python: not found

后端 未结 19 1095
执念已碎
执念已碎 2020-11-29 15:15

I\'m running into an error I\'ve never seen before. Here is the command and the error:

$ ansible-playbook create_api.yml

PLAY [straw] **********************         


        
19条回答
  •  日久生厌
    2020-11-29 15:47

    To summarize everyone else's answers, here are the combined settings that worked for me:

     - hosts: all
       become: true
       gather_facts: false
    
       # Ansible requires python2, which is not installed by default on Ubuntu Xenial
       pre_tasks:
         - raw: sudo apt-get -y install python-simplejson
         # action: setup will gather facts after python2 has been installed
         - action: setup
    

提交回复
热议问题