vagrant-flow 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +47 -2
- data/lib/vagrant-flow/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35c664b3322c45d7bb13db916096784f9b189ca2
|
4
|
+
data.tar.gz: 2516bb8024c1bdf8544b3f53d292ffa362fe4729
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f30cacaccfa10b80d8ab9a0ced85bb879612c527f9a347a179ba1ea5afb926f62f03562e4ead4de8ef931e5d39b0f62e449acb89843f455e00871fd609488519
|
7
|
+
data.tar.gz: a3c351baba9fc3a61dc83812c8ad7cbb56400cfefbfaaccd3b19b038cc21a83d08e333dafd9ac032d60086a2bbad4af4cc4292bdc469d920dbf9ce9c70522a88
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Vagrant-Flow
|
2
2
|
|
3
|
-
Vagrant Plugin allows for a better ansible flow
|
3
|
+
Vagrant Plugin allows for a better ansible flow. It generates ansible inventory files to easily prepare to run ansible playbooks
|
4
4
|
|
5
5
|
|
6
6
|
## Installation
|
@@ -23,8 +23,53 @@ Or install it yourself as:
|
|
23
23
|
$ gem install vagrant-flow
|
24
24
|
|
25
25
|
## Usage
|
26
|
+
```
|
27
|
+
#Bring up your vagrant machines
|
28
|
+
vagrant up
|
29
|
+
#Run ansible inventory
|
30
|
+
vagrant ansible-inventory
|
31
|
+
#point ansible-playbook to the generated vagrant-flow_ansible_inventory, and point them to whatever playbook you'd like
|
32
|
+
ansible-playbook -i path/to/vagrant-flow_ansible_inventory my_playbook.yml
|
33
|
+
```
|
34
|
+
## Usage Expectations
|
35
|
+
|
36
|
+
This plugin expects your vagrantfile to contain a configuration to define groups for all your VMs.
|
37
|
+
|
38
|
+
Example VAGRANTFILE excerpt:
|
39
|
+
```
|
40
|
+
config.vm.provision "ansible" do |ansible|
|
41
|
+
#ansible.playbook is required, but emptyplaybook.yml can do nothing,
|
42
|
+
#this way we bypass vagrant's embedded ansible plugin
|
43
|
+
ansible.playbook="emptyplaybook.yml"
|
44
|
+
ansible.groups = {
|
45
|
+
"testgroup" => ["testbox"],
|
46
|
+
"servergroup" => ["server1", "server2"],
|
47
|
+
"common:children" => ["testgroup","servergroup"] #Common things on per-group basis
|
48
|
+
}
|
49
|
+
end
|
50
|
+
```
|
51
|
+
|
52
|
+
Example playbook.yml:
|
53
|
+
```
|
54
|
+
---
|
55
|
+
#Configures the groups defined in common:children
|
56
|
+
- hosts: common
|
57
|
+
remote_user: root
|
58
|
+
roles:
|
59
|
+
- common
|
60
|
+
|
61
|
+
#Configures all machines in the group "testgroup"
|
62
|
+
- hosts: testgroup
|
63
|
+
remote_user: root
|
64
|
+
roles:
|
65
|
+
- jenkins
|
66
|
+
|
67
|
+
#Configures specific machine server1
|
68
|
+
- hosts: server1
|
69
|
+
roles:
|
70
|
+
- apache
|
71
|
+
```
|
26
72
|
|
27
|
-
`vagrant ansible-inventory`
|
28
73
|
|
29
74
|
## Contributing
|
30
75
|
|
data/lib/vagrant-flow/version.rb
CHANGED