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

后端 未结 19 1037
执念已碎
执念已碎 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:55

    What I used to get this working on ubuntu 15.10 on a fresh Digital Ocean droplet:

    # my-playbook.yml
    - name: python2
      hosts: test
      gather_facts: no
      pre_tasks:
        - raw: sudo apt-get -y install python-simplejson
    
    $ ansible-playbook path/to/my-playbook.yml
    

    For ubuntu 16.04 on a fresh OVH SSD, I had to apt-get upgrade before the python2 packages were available.

提交回复
热议问题