2
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Ansible AWX のインストール

Last updated at Posted at 2019-12-11

環境

  • OS: CentOS Linux release 7.6.1810 (Core)
  • Ansible AWX 9.0.1.0

参考情報

Installing AWX
https://github.com/ansible/awx/blob/devel/INSTALL.md

こことかも。
https://qiita.com/matchpon23/items/7442632bd23b3cf0554e
https://qiita.com/nakacya/items/b80575210d2168284d89

事前準備

上記「Installing AWX」の「Prerequisites」を実施。
あと、python3 の導入も併せて実施

python3 & Ansible

python3 & Ansible インストール

# yum install -y https://centos7.iuscommunity.org/ius-release.rpm
# yum install -y python36 python36-pip python36-devel
# pip3 install --upgrade pip #ここで OS 再起動
# pip3 install ansible

Docker & docker (Python module)

Docker & docker (Python module) インストール

# yum install -y yum-utils device-mapper-persistent-data lvm2
# yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
# yum install -y docker-ce docker-ce-cli containerd.io
# systemctl enable docker
# pip install docker

git

git インストール

# yum -y install https://centos7.iuscommunity.org/ius-release.rpm
# yum -y install perl-TermReadKey perl-Error libsecret
# yum --disablerepo=* --enablerepo=ius -y install git2u

Node.js,npm

Node.js,npm インストール

# curl -sL https://rpm.nodesource.com/setup_10.x | bash -
# yum install -y nodejs
# yum install -y gcc-c++ make

docker-compose

docker-compose インストール

# pip install docker-compose

Ansible AWX のインストール

Ansible AWX インストール

# git clone https://github.com/ansible/awx
# cd awx/installer/
# ansible-playbook -i inventory install.yml

以下が出力される可能性がある。

TASK [local_docker : Start the containers] ************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Failed to import the required Python library (Docker SDK
for Python: docker (Python >= 2.7) or docker-py (Python 2.6)) on localhost.localdomain's Python /usr/bin/python. Pl
ease read module documentation and install in the appropriate location. If the required library is installed, but A
nsible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter, for e
xample via `pip install docker` or `pip install docker-py` (Python 2.6). The error was: No module named requests.ex
ceptions"}

その場合は以下を実施。

/awx/installer/inventory
#localhost ansible_connection=local ansible_python_interpreter="/usr/bin/env python"
localhost ansible_connection=local ansible_python_interpreter="/usr/bin/python3"
2
4
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
2
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?