コンテンツにスキップ

「Ansible」の版間の差分

提供: ArchWiki
削除された内容 追加された内容
同期
同期
13行目: 13行目:
Ansible は対象のマシンに [[Python]] を必要とします。Python 3 はプレビューとしてサポートされていますが全てのモジュールが動作するとは限りません [https://docs.ansible.com/ansible/python_3_support.html]。デフォルトでは Ansible はリモートシステムの {{ic|/usr/bin/python}} が 2.X あるいは 3.X バージョンの Python (特に 2.4 以上) だと想定しています。
Ansible は対象のマシンに [[Python]] を必要とします。Python 3 はプレビューとしてサポートされていますが全てのモジュールが動作するとは限りません [https://docs.ansible.com/ansible/python_3_support.html]。デフォルトでは Ansible はリモートシステムの {{ic|/usr/bin/python}} が 2.X あるいは 3.X バージョンの Python (特に 2.4 以上) だと想定しています。


使用するモジュールが Python 2 を必要とする場合、Ansible のインベントリファイルで {{ic|ansible_python_interpreter}} 変数を設定して Python 2 の場所を Ansible に指定する必要があります。
使用するモジュールが Python 2 を必要とする場合、Ansible のインベントリファイルで {{ic|ansible_python_interpreter}} 変数を設定して Python 2 の場所を Ansible に指定する必要があります。以下のようにホストグループを使って設定できます:

{{hc|inventory|
[archlinux]
server1
server2

[debian]
server3

[archlinux:vars]
ansible_python_interpreter<nowiki>=</nowiki>/usr/bin/python2
}}


Python の設定に関する詳細は [https://docs.ansible.com/ansible/python_3_support.html], [http://docs.ansible.com/faq.html#how-do-i-handle-python-pathing-not-having-a-python-2-x-in-usr-bin-python-on-a-remote-machine], [http://docs.ansible.com/intro_inventory.html#list-of-behavioral-inventory-parameters] にあります。
Python の設定に関する詳細は [https://docs.ansible.com/ansible/python_3_support.html], [http://docs.ansible.com/faq.html#how-do-i-handle-python-pathing-not-having-a-python-2-x-in-usr-bin-python-on-a-remote-machine], [http://docs.ansible.com/intro_inventory.html#list-of-behavioral-inventory-parameters] にあります。

2017年5月25日 (木) 23:16時点における版

docs.ansible.com より:

Ansible は IT 自動化ツールです。システムを設定し、ソフトウェアをデプロイして、継続的なデプロイや休止期間を挟まないローリングアップデートなど高度な IT 業務をオーケストラレートできます。

インストール

ansible パッケージをインストールしてください。デプロイメントや設定などの作業を自動化したいリモートマシンに必要なのは Python のインタプリタと OpenSSH サーバーだけです。

Python の場所を Ansible に指定する

Ansible は対象のマシンに Python を必要とします。Python 3 はプレビューとしてサポートされていますが全てのモジュールが動作するとは限りません [1]。デフォルトでは Ansible はリモートシステムの /usr/bin/python が 2.X あるいは 3.X バージョンの Python (特に 2.4 以上) だと想定しています。

使用するモジュールが Python 2 を必要とする場合、Ansible のインベントリファイルで ansible_python_interpreter 変数を設定して Python 2 の場所を Ansible に指定する必要があります。以下のようにホストグループを使って設定できます:

inventory
[archlinux]
server1
server2

[debian]
server3

[archlinux:vars]
ansible_python_interpreter=/usr/bin/python2

Python の設定に関する詳細は [2], [3], [4] にあります。