6
2

More than 3 years have passed since last update.

UbuntuにAnsibleをインストールする手順

Posted at

Linux環境にAnsibleをインストールします

使用環境

・ ホストOS: Windows10 Home
・ ゲストOS: WSL2 Ubuntu20

手順

下記コマンドを上から順に実行する。
公式docそのままの手順です

$ sudo apt update
$ sudo apt install software-properties-common
$ sudo add-apt-repository --yes --update ppa:ansible/ansible
$ sudo apt install ansible

下記コマンドを実行してバージョンが表示されれば成功です。

$ ansible --version
ansible 2.9.6
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.8.2 (default, Jul 16 2020, 14:00:26) [GCC 9.3.0]

ちなみにデフォルトではAnsibleは/usr/bin/ ディレクトリにインストールされます

$ which ansible
/usr/bin/ansible

参考資料

Installing Ansible - Ansible Documentation

6
2
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
6
2