環境
ubuntu@ip-172-31-0-101:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.3 LTS"
ubuntu@ip-172-31-0-101:~$ uname -a
Linux ip-172-31-0-101 4.4.0-1054-aws #63-Ubuntu SMP Wed Mar 28 19:42:42 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
インストール
公式ドキュメントを参考に最新版をインストール
$ sudo apt-get update
$ sudo apt-get install software-properties-common
$ sudo apt-add-repository ppa:ansible/ansible
$ sudo apt-get update
$ sudo apt-get install ansible
software-properties-common
はディストリビューションや独自ソフトウェアベンダのリポジトリを簡単に管理できるもの。ここではansibleのppaを抽象的に追加している。
https://allabout.co.jp/gm/gc/438675/
ubuntu@ip-172-31-0-101:~$ ansible --version
ansible 2.5.2
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/home/ubuntu/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/dist-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609]
とりあえずインストールまで。明日から本気出す。