Skip to content

Instantly share code, notes, and snippets.

@Voronenko
Last active May 25, 2017 07:45
Show Gist options
  • Save Voronenko/a1e4e9549e4a3f82f0d8172fe3c1f3f8 to your computer and use it in GitHub Desktop.
Save Voronenko/a1e4e9549e4a3f82f0d8172fe3c1f3f8 to your computer and use it in GitHub Desktop.
Python2 ansible workarounds
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
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