This repository has been archived by the owner on Jun 22, 2021. It is now read-only.
forked from caljess599/ansible-vagrant
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathvagrant-test-subcommands.yaml
74 lines (59 loc) · 1.56 KB
/
vagrant-test-subcommands.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
---
- hosts:
- localhost
connection: local
gather_facts: False
# vars:
# keypair: robparrott-ec2
# instance_type: t1.micro
# security_group: my-little-instance
# image: ami-1624987f
# mail_from: [email protected]
# mail_to: [email protected]
# me: "Rob Parrott"
# vars_prompt:
# shortname: "What is the shortname of this host to be?"
tasks:
- name: Fire up a vagrant instance
local_action: vagrant
command=up
box_name=centos6
register: vagrant
- name: Fire up another couple vagrant instances
local_action: vagrant
command=up
box_name=lucid32
vm_name=fred
count=2
register: vagrant
- name: Report the status of fred (with 2 instances)
local_action: vagrant
command=status
vm_name=fred
register: vagrant
- name: Report the status of everyone (three total ...)
local_action: vagrant
command=status
register: vagrant
- name: Report the configuration info of fred
local_action: vagrant
command=config
vm_name=fred
register: vagrant
- name: Stop one
local_action: vagrant
command=halt
vm_name=fred
register: vagrant
- name: Stop all
local_action: vagrant
command=halt
register: vagrant
- name: Destroy 'em
local_action: vagrant
command=destroy
register: vagrant
- name: Clear it out
local_action: vagrant
command=clear
register: vagrant