LoginSignup
1
1

More than 3 years have passed since last update.

Cygwin + Python3 環境で ansible のインストール (2020/02現在)

Last updated at Posted at 2019-02-13

2020/02現在、ansibleはCygwinパッケージに含まれているため、以下の情報は不要となった。

Cygwinパッケージにはansibleは含まれておらず、pipで入れる必要があるが、ansibleが依存するパッケージは全てCygwinパッケージとして存在している。よって、事前に依存パッケージをインストール後、ansibleをインストールすればよい1

なお、ansible(2019/02/13時点での最新は2.7.7)は2.5以降でPython3に対応している2ため、ここではPython3の環境に導入するものとする。

依存パッケージのインストール

事前に以下のCygwinパッケージをインストールする。

  • python3-setuptools
  • python3-pip
  • python3-jinja2
  • python3-markupsafe
  • python3-yaml
  • python3-paramiko
  • python3-cryptography
  • python3-setuptools
  • python3-bcrypt
  • python3-nacl

ansibleのインストール

上記のパッケージのインストールが完了したら、下記コマンドを実行すればよい。

pip3 install -v ansible

  1. Cygwinの場合、依存関係の処理を全てpipにまかせると、PyNaClなどネイティブバイナリを生成するパッケージのビルドで失敗する。 

  2. Python 3 Support: https://docs.ansible.com/ansible/latest/reference_appendices/python_3_support.html 

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1