Last active
May 25, 2017 07:45
-
-
Save Voronenko/a1e4e9549e4a3f82f0d8172fe3c1f3f8 to your computer and use it in GitHub Desktop.
Python2 ansible workarounds
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
tasks: | |
- name: install python and deps for ansible modules | |
raw: test -e /usr/bin/python || (apt -qqy update && apt install -qy python-minimal) | |
- name: gather facts | |
setup: | |
if [ ! -e "/usr/bin/python" ] | |
then | |
apt -qqy update && apt install -qy python-minimal | |
fi |
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
tasks: | |
- name: install python and deps for ansible modules | |
raw: test -e /usr/bin/python || (dnf install -y python2 python2-dnf libselinux-python) | |
- name: gather facts | |
setup: | |
if [ ! -e "/usr/bin/python" ] | |
then | |
dnf install -y python2 python2-dnf libselinux-python | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment