Ansible environment construction For Mac

Ansible2.0 environment construction

Index

1. Installation method ver.Mac

2. Installation method ver. Client side

Output result list

1. How to install

1. Delete the existing ansible

brew uninstall ansible --force

2. Install pyenv-virtualenv

・ Pyenv You can install and switch between multiple versions of Python ・ Pyenv-virtualenv A pyenv plugin that allows you to switch between multiple environments with the same version of Python

brew install pyenv-virtualenv
pyenv versions

3. Python installation + Ansible2 environment creation

xcode-select --install #Command Line Tools installation
pyenv install 2.7.10   #Python2 in pyenv.7.10 Create environment
pyenv versions         #* 1 output
pyenv virtualenv 2.7.10 ansible2 #2 in virtualenv.7.Create ansible2 based on 10
pyenv versions         #* 2 output

4. Switch global Python to ansible2

pyenv global ansible2
pyenv versions  #* 3 output
python --version => 2.7.10

5. Pass the path for the pip command (zsh)

echo eval "$(pyenv init -)" >> ~/.zshrc
source ~/.zshrc

6.ansible 2.x installation

pip install ansible
ansible --version => 2.x series
=>What to do if an error occurs=>Error handling 1

※1,※2, ※3

> ※1
system (set by /Users/hoge/.pyenv/version)
  2.7.10
  
>※2
* system (set by /Users/oge/.pyenv/version)
  2.7.10
  2.7.10/envs/ansible2
  ansible2
  
>※3
  system
  2.7.10
* ansible2 (set by /Users/hoge/.pyenv/version)
> ※4
>>Error

Confirmed because it is said that there is no gmp
# brew install gmp
=>Get angry if it's already installed

Error handling

※1 error contents

src/_fastmath.c:36:11: fatal error: 'gmp.h' file not found # include <gmp.h> ^ 1 error generated. error: command 'clang' failed with exit status 1

I get an error saying there is no gmp

brew install gmp =>Reinstall because it gets angry if it is already
brew uninstall gmp
brew install gmp   #Done

Recommended Posts

Ansible environment construction For Mac
Python environment construction For Mac
Python3 TensorFlow for Mac environment construction
Anaconda-4.2.0-python3 environment construction (Mac)
Mac environment construction Python
Pyxel environment construction (Mac)
Mac development environment construction (Ansible + Serverspec + Travis CI)
Python3 environment construction (for beginners)
Mac + Eclipse (PyDev) + Django environment construction
Anaconda environment construction on Mac (2018 version)
[For beginners] Django -Development environment construction-
Python environment construction memo on Mac
Environment construction of python3.8 on mac
Django environment construction
Mac OS X Mavericks 10.9.5 Development environment construction
DeepIE3D environment construction
Linux environment construction
Python project environment construction procedure (for windows)
Python environment construction
Creating amateur python environment settings (for MAC)
Environment construction (python)
django environment construction
[Mac] Building a virtual environment for Python
CodeIgniter environment construction
python environment construction
Python --Environment construction
Prepare the development environment for keyhac for Mac
Mac OS X Yosemite 10.10 Development environment construction
Mac OS X development environment construction memo
Construction of development environment for Choreonoid class
Golang environment construction
python environment construction
Environment construction for MXNet tutorial (gluon part)
Word2vec environment construction
Python3 TensorFlow environment construction (Mac and pyenv virtualenv)
Python explosive environment construction starting from zero (Mac)
Building an environment for executing Python scripts (for mac)
Cloud9 environment construction for developing serverless web applications
Building an environment for matplotlib + cartopy on Mac
Pillow environment construction --For Docker + iPython (and OpenCV)
Mac OS X Mountain Lion 10.8.5 Development environment construction
Environment construction: GCP + Docker
Django project environment construction
python windows environment construction
Go language environment construction
ConoHa environment construction memo
homebrew python environment construction
YOLO v4 environment construction ①
pyenv + fish environment construction
BigGorilla environment construction memo
grip environment construction onCentOS6.5
Anaconda environment construction memo
Golang environment construction [goenv]
Python environment construction @ Win7
Python environment for projects
Build a local development environment for Laravel6.X on Mac
Building an environment for "Tello_Video" on Mac OS X
Summary of python environment settings for myself [mac] [ubuntu]
Environment construction with anyenv + pyenv (migrate from pyenv only (Mac))
[Python] Django environment construction (pyenv + pyenv-virtualenv + Anaconda) for macOS
How to build a development environment for TensorFlow (1.0.0) (Mac)