Home
Packages
Forums
Wiki
GitLab
Security
AUR
Download
コンテンツにスキップ
メインメニュー
メインメニュー
サイドバーに移動
非表示
案内
メインページ
目次
コミュニティに貢献
最近の出来事
おまかせ表示
特別ページ
交流
ヘルプ
貢献
最近の更新
最近の議論
新しいページ
統計
リクエスト
ArchWiki
検索
検索
表示
アカウント作成
ログイン
個人用ツール
アカウント作成
ログイン
Ansibleのソースを表示
ページ
議論
日本語
閲覧
ソースを閲覧
履歴を表示
ツール
ツール
サイドバーに移動
非表示
操作
閲覧
ソースを閲覧
履歴を表示
全般
リンク元
関連ページの更新状況
ページ情報
表示
サイドバーに移動
非表示
←
Ansible
あなたには「このページの編集」を行う権限がありません。理由は以下の通りです:
この操作は、次のグループに属する利用者のみが実行できます:
登録利用者
。
このページのソースの閲覧やコピーができます。
[[Category:システム管理]] [[en:Ansible]] [http://docs.ansible.com/ docs.ansible.com] より: :''Ansible は IT 自動化ツールです。システムを設定し、ソフトウェアをデプロイして、継続的なデプロイや休止期間を挟まないローリングアップデートなど高度な IT 業務をオーケストラレートできます。'' == インストール == 制御マシン (サーバーあるいはマスター) に {{Pkg|ansible}} パッケージを[[インストール]]してください。 自動デプロイや設定作業を適用したい管理マシン (クライアントあるいはスレーブ) には {{Pkg|python2}} (あるいは実験的な {{Pkg|python}}) と {{Pkg|openssh}} をインストールしてください。ssh 接続を正しく機能させるには [[SSH_鍵#リモートサーバーに公開鍵をコピー|ssh 鍵の設定]]が必要です。 == 基本的な使い方 == === インベントリ === According to the default settings in {{ic|/etc/ansible/ansible.cfg}}, one can define its infrastructure in {{ic|/etc/ansible/hosts}}. For instance, the following inventory defines a tiny cluster with three nodes: {{hc|/etc/ansible/hosts| [control] 192.168.12.1 [managed] 192.168.12.2 192.168.12.3 }} One can assign specific attributes to every node in the file. Check [http://docs.ansible.com/ansible/latest/intro_inventory.html the official document] for the details. === Ping === You may check if all the nodes listed in the inventory is alive by $ ansible all -m ping === Playbook === Playbook serves as a powerful tool to deploy and configure the whole infrastructure. Check [http://docs.ansible.com/ansible/latest/playbooks.html the official document] for more details. Here is an extremely simple use case, only for demonstration purpose, where the administrator of above inventory want to perform a full system upgrade on all nodes. First, create a playbook file, in YAML format: {{hc|syu.yml| - hosts: control managed tasks: - name: full system upgrade script: /usr/bin/pacman -Syu }} Then, run the playbook script: # ansible-playbook syu.yml == Tips and tricks == === Python の場所を Ansible に指定する === 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 に指定する必要があります。以下のようにホストグループを使って設定できます: {{hc|Inventory file| [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] にあります。 == 参照 == * [https://www.ansible.com/quick-start-video Ansible concept in 12 minutes] * [http://docs.ansible.com/ansible/latest/pacman_module.html pacman module details]
このページで使用されているテンプレート:
テンプレート:Bc
(
ソースを閲覧
)
テンプレート:Hc
(
ソースを閲覧
)
テンプレート:Ic
(
ソースを閲覧
)
テンプレート:Pkg
(
ソースを閲覧
)
テンプレート:Tip
(
ソースを閲覧
)
Ansible
に戻る。
検索
検索
Ansibleのソースを表示
話題を追加