Created
March 19, 2018 08:54
-
-
Save code-later/15e668bf8e74ac653243b0a3c8e7f852 to your computer and use it in GitHub Desktop.
Install Python 2.7 with Ansible in pre_tasks
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
--- | |
- hosts: all | |
become: True | |
gather_facts: False | |
pre_tasks: | |
- name: Install python for Ansible | |
raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal) | |
changed_when: False | |
- setup: # aka gather_facts | |
vars: | |
roles: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment