LoginSignup
1
1

More than 3 years have passed since last update.

Ansible 初心者がplaybook~roleを学ぶ ② Ansibleインストール

Last updated at Posted at 2020-10-16

前回に引き続き、Ansible環境構築を本稿でも進めます。
前回作成したvm:ansibleにAnsibleをインストール、設定を進めていくのが主な目的になります。

os:centos7.2
ansible version (2.9.13) ※Mitogen for Ansibleを使いたいため、このversion
python version (3.6.8)  
※デフォルトでpython2.7.5が入っていますが、
 サポート終了しているということで、この手順ではpython3でのインストールにしました。

0.tera-tarmで前回作成したvm:ansibleへssh接続する。

    IP address: 192.168.16.11
    ID: vagrant
    PW: vagrant

1.pythno3のインストール

    $ sudo yum update -y
    $ sudo yum install -y python36 python36-pip python36-devel

2.pip3でAnsible install

$ sudo pip3 install --upgrade pip
$ sudo pip3 install ansible\==2.9.13

5.ansibleバージョンを確認する。

$  ansible --version
ansible 2.9.13
  config file = None
  configured module search path = ['/home/vagrant/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.6/site-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 3.6.8 (default, Apr  2 2020, 13:34:55) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]

★python3でansibleが稼働していることが確認できたらOK.

次回Link>>Ansible 初心者がplaybook~roleを学ぶ ③ Ansible初期設定

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