Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

With Ansible I use the 'raw' command to run a command to check whether Python (dependency of Ansible) is installed, and install it if not.

    - name: Bootstrap Ansible
      hosts: all
      gather_facts: False
      tasks:
        - name: Install Python 2
          raw: test -e /usr/bin/python || (sudo apt -y update && sudo apt install -y python-minimal)


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: