ansible-haproxy:..

时间:2021-04-01 21:05:46
【文件属性】:
文件名称:ansible-haproxy:..
文件大小:5KB
文件格式:ZIP
更新时间:2021-04-01 21:05:46
将ssh pub密钥添加到config- *目录 IE: for d in config-frontend1 frontend-2 config-haproxy; do cp $HOME/.ssh/id_rsa.pub $d done 然后使用以下命令构建服务: docker-compose build 并使用以下命令运行它: docker-compose up 现在在主机中,您无需密码即可进入三个对话框(假设您在主机中安装了ansible): for h in frontend1 frontend2 haproxy; do ansible $h -i inventory.yml -m ping; done 要检查前端是否可以访问http服务器,请执行以下操作: # frontend1 $ curl http://localhost:8080 # frontend2 $ c
【文件预览】:
ansible-haproxy-master
----.gitignore(49B)
----ansible.cfg(61B)
----config-frontend2()
--------.keep(0B)
--------index.html(81B)
----config-frontend1()
--------.keep(0B)
--------index.html(81B)
----Dockerfile.haproxy(69B)
----Dockerfile.nginx(254B)
----docker-compose.yml(2KB)
----nginx()
--------run(51B)
----README.md(633B)
----http-default_server.conf(148B)
----inventory.yml(318B)
----config-haproxy()
--------.keep(0B)

网友评论