Forked from mohankumargupta/install-ansible-on-msys2.sh
Last active
September 20, 2023 05:33
-
-
Save DaveB93/db94a6b310e08c928c0778f766562ab0 to your computer and use it in GitHub Desktop.
This file contains 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
#!/usr/bin/bash | |
which ansible >/dev/null 2>&1 | |
if [ $? -ne 0 ]; | |
then | |
echo "Installing Ansible..." | |
sleep 5 | |
pushd . | |
cd ~ | |
pacman -S libyaml-devel python2 tar libffi libffi-devel gcc pkg-config make openssl-devel openssh libcrypt-devel --noconfirm --needed | |
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py | |
python2 get-pip.py | |
wget -c https://download.libsodium.org/libsodium/releases/libsodium-1.0.16-mingw.tar.gz | |
tar xvzf libsodium-1.0.16-mingw.tar.gz | |
SODIUM_INSTALL=system CFLAGS=`pkg-config --cflags libffi` LDFLAGS=`pkg-config --libs libffi` C_INCLUDE_PATH=~/libsodium-win64/include LIBRARY_PATH=~/libsodium-win64/lib python2 -m pip install cffi --no-binary :all: | |
SODIUM_INSTALL=system CFLAGS=`pkg-config --cflags libffi` LDFLAGS=`pkg-config --libs libffi` C_INCLUDE_PATH=~/libsodium-win64/include LIBRARY_PATH=~/libsodium-win64/lib python2 -m pip install pynacl | |
python2 -m pip install ansible --no-binary :all: | |
popd | |
fi | |
which ansible >/dev/null 2>&1 | |
if [ $? -eq 0 ]; | |
then | |
echo "Ansible installed." | |
else | |
echo "Ansible not installed." | |
fi |
This file contains 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
#!/usr/bin/bash | |
which ansible >/dev/null 2>&1 | |
if [ $? -ne 0 ]; | |
then | |
echo "Installing Ansible..." | |
sleep 5 | |
pushd . | |
cd ~ | |
pacman -S libyaml-devel python3 python3-pip mingw-w64-x86_64-libsodium libffi libffi-devel gcc pkg-config make openssl-devel openssh libcrypt-devel --noconfirm --needed | |
SODIUM_INSTALL=system CFLAGS=`pkg-config --cflags libffi` LDFLAGS=`pkg-config --libs libffi` python3 -m pip install cffi --no-binary :all: | |
SODIUM_INSTALL=system CFLAGS=`pkg-config --cflags libffi` LDFLAGS=`pkg-config --libs libffi` C_INCLUDE_PATH=/mingw64/include LIBRARY_PATH=/mingw64/lib python3 -m pip install pynacl | |
python3 -m pip install ansible --no-binary :all: | |
popd | |
fi | |
which ansible >/dev/null 2>&1 | |
if [ $? -eq 0 ]; | |
then | |
echo "Ansible installed." | |
else | |
echo "Ansible not installed." | |
fi |
@Alex1a it didn't have it or didn't work very well 2 or 3 years ago ( I'm not even sure when I wrote this gist initially )
@Alex1a it didn't have it or didn't work very well 2 or 3 years ago ( I'm not even sure when I wrote this gist initially )
Build configurations are inspired by these and other instructions, I'm just leaving things documented. Thank you
mmm.. yes fair point. sorry if I seemed snappy. would it be better for me to delete / update the gist?
of course not, is a good reference. thank you for sharing
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
MSYS2 already have ansible package support, just type
pacman -S ansible
on your MSYS2 terminal 😀