Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mrcfps/deploy-my-first-project

《一行命令操纵“千军万马”:Ansible 自动化部署入门》源代码仓库
https://github.com/mrcfps/deploy-my-first-project

ansible ansible-playbook deployment vagrant

Last synced: about 13 hours ago
JSON representation

《一行命令操纵“千军万马”:Ansible 自动化部署入门》源代码仓库

Awesome Lists containing this project

README

        

# Deploy My First Project

此仓库是我所写文章[一行命令操纵“千军万马”:Ansible 自动化部署入门](https://www.jianshu.com/p/560d3b32ee84)的代码仓库。其中 single 目录内是单主机部署, multiple 内是多主机部署。

## 单主机部署

进入 single 目录,启动虚拟机:

```bash
$ cd single
$ vagrant up
```

部署 index.html:

```bash
$ ansible-playbook deploy.yml
```

如果实验结束,删除虚拟机:

```bash
$ vagrant destroy
```

## 多主机部署

进入 multiple 目录,启动虚拟机:

```bash
$ cd multiple
$ vagrant up
```

部署 index.html:

```bash
$ ansible-playbook deploy.yml
```

如果实验结束,删除虚拟机:

```bash
$ vagrant destroy
```