Created
May 28, 2020 14:51
-
-
Save thejhh/79ac72e172f2331f2b3a1b521b603610 to your computer and use it in GitHub Desktop.
Python bootstrap for ansible
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: hosts | |
| remote_user: root | |
| gather_facts: false | |
| tasks: | |
| - name: Check for Python | |
| raw: test -e /usr/bin/python | |
| changed_when: false | |
| failed_when: false | |
| register: check_python | |
| - name: Install Python | |
| raw: apt update && apt install -y python-minimal | |
| when: check_python.rc != 0 |
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
| --- | |
| - import_playbook: install-python.yml | |
| - hosts: hosts | |
| ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment