# More Commands

### Vagrant usefull commands (vm management)

* start all lab vms :

```
vagrant up
```

* start only one vm :

```
vagrant up <vmname>
```

* stop all the lab vm :

```
vagrant halt
```

* drop all the lab vm (because you want to recreate all) (carrefull : this will erase all your lab instance)

```
vagrant destroy
```

* snapshot the lab ([https://www.vagrantup.com/docs/cli/snapshot](https://www.vagrantup.com/docs/cli/snapshot))

```
vagrant snapshot push
```

* restore the lab snapshot (this could break servers relationship, reset servers passwords with fix\_trust.yml playbook)

```
vagrant snapshot pop
```

### Ansible commands (provisioning management)

**Play only an ansible part**

* only play shares of member\_server.yml :

```
ansible-playbook member_server.yml --tags "data,shares"
```

**Play only on some server**

```
ansible-playbook -l dc2 domain_controller.yml
```

**Add some vulns**

```
ansible-playbook vulnerabilities.y
```
