Last active
December 24, 2019 14:47
-
-
Save sevkin/e81117ec3c84a6e06803cec7a352c43b to your computer and use it in GitHub Desktop.
ansible bootstrap python on deb based distros
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 | |
any_errors_fatal: True | |
gather_facts: no | |
become: True | |
tasks: | |
- name: test python-apt | |
raw: "which python && python -c \"import apt\"" | |
ignore_errors: True | |
changed_when: False | |
failed_when: False | |
register: bootstrap_python | |
- name: install python-apt | |
raw: "apt update && apt install -y python-apt" | |
when: bootstrap_python.rc != 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment