Forked from gwillem/ansible-bootstrap-ubuntu-16.04.yml
Created
August 13, 2018 16:16
-
-
Save karlmutch/054ce13e973d4cdf5a85c76d474e4e9d to your computer and use it in GitHub Desktop.
Get Ansible to work on bare Ubuntu 16.04 without python 2.7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add this snippet to the top of your playbook. | |
# It will install python2 if missing (but checks first so no expensive repeated apt updates) | |
# [email protected] | |
- hosts: all | |
gather_facts: False | |
tasks: | |
- name: install python 2 | |
raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment