python读awx⽂件_Ansible之AWX安装部署
环境说明
安装部署
依赖说明
安装ansible
# yum install epel-release
# yum install ansible
安装 Docker
# yum install -y yum-utils device-mapper-persistent-data lvm2
# yum-config-manager --add-repo download.docker/linux/po
# yum install docker-ce docker-ce-cli containerd.io
# systemctl start docker
# systemctl enable docker
配置Docker镜像加速
# curl -sSL get.daocloud.io/daotools/set_mirror.sh | sh -s daocloud.io
# systemctl restart docker
安装 docker-compose 的Python模块
# yum install python3-pip
# pip3 install docker-compose
安装 Docker Compose
# curl -L "github/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
# chmod +x /usr/local/bin/docker-compose
# ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
# docker-compose --version
docker-compose version 1.24.1, build 4667896
下载 AWX项⽬、配置、部署
# git glone github/ansible/awx
# cd awx/installer/
修改配置 inventory⽂件配置
pg_password=***
rabbitmq_password=***
admin_password=***
部署安装
# ansible-playbook -i l
python怎么读文件等待Docker容器启动
# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
aa86f7189b6e ansible/awx_task:9.0.1 "/tini -- /bin/sh -c…" 7 days ago Up 7 days 8052/tcp awx_task
9ef2408a1105 ansible/awx_web:9.0.1 "/tini -- /bin/sh -c…" 7 days ago Up 7 days 0.0.0.0:80->8052/tcp awx_web
de4be7e37ca5 postgres:10 "docker-entrypoint.s…" 7 days ago Up 7 days 5432/tcp awx_postgres
66167deaf9e4 ansible/awx_rabbitmq:3.7.4 "docker-entrypoint.s…" 7 days ago Up 7 days 4369/tcp, 5671-5672/tcp, 15671-15672/tcp, 25672/tcp awx_rabbitmq
536f2596655d memcached:alpine "docker-entrypoint.s…" 7 days ago Up 7 days 11211/tcp awx_memcached
部署完成,浏览器访问本机IP地址,默认使⽤80端⼝
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论