playbook 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +5 -0
- data/.travis.yml +6 -0
- data/Gemfile +4 -0
- data/README.md +49 -0
- data/features/init.feature +6 -0
- data/features/install.feature +15 -0
- data/features/step_definitions/init_steps.rb +7 -0
- data/features/step_definitions/install_steps.rb +12 -0
- data/features/support/env.rb +1 -0
- data/features/support/playbooks.yml +1 -0
- data/lib/playbook/init.rb +7 -0
- data/lib/playbook/install.rb +25 -0
- data/playbook.gemspec +20 -0
- metadata +14 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f6e43a206165e1c1331e870bda95e6f3a20a9c9
|
4
|
+
data.tar.gz: f62e521a8d2e843c8b2aa5bbfed25dccd43d0516
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64eb8a56a486f2352641bd567ff8ded1ac3acf1cd04867465560398dd9d839f5c062bfc584ef369328c0f00258d51dd64417e78909d82e6bd38cf55b85e69ec7
|
7
|
+
data.tar.gz: fab696ad010975f9501ab9b3b462d7331e47ecff4fa04bc3bd002527bd6622c4ff26d1eadad074e2ac3283c5b999fa7dc5e5f0948607c00514905f429dbc9282
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
playbook [](https://travis-ci.org/schickling/playbook)
|
2
|
+
========
|
3
|
+
|
4
|
+
[Ansible](www.ansibleworks.com) playbook manager - The **fast and easy** way to install playbooks.
|
5
|
+
|
6
|
+
## Features
|
7
|
+
* Use existing playbooks and configure them to your need
|
8
|
+
* No more copy & paste
|
9
|
+
* Easy to maintain
|
10
|
+
|
11
|
+
## Installation
|
12
|
+
|
13
|
+
```sh
|
14
|
+
$ gem install playbook
|
15
|
+
```
|
16
|
+
|
17
|
+
## Usage
|
18
|
+
|
19
|
+
A simple usage example can be found [here](https://github.com/schickling/playbook-example).
|
20
|
+
|
21
|
+
#### 1. Create your playbook file
|
22
|
+
```sh
|
23
|
+
$ playbook init
|
24
|
+
```
|
25
|
+
|
26
|
+
#### 2. Specify your playbooks in `playbooks.yml`
|
27
|
+
```yml
|
28
|
+
- schickling/nginx-playbook
|
29
|
+
- schickling/php54-playbook
|
30
|
+
```
|
31
|
+
|
32
|
+
#### 3. Install the playbooks
|
33
|
+
Either run the following command
|
34
|
+
```sh
|
35
|
+
$ playbook install
|
36
|
+
```
|
37
|
+
or add this line in your `Vagrantfile` before the ansible provision
|
38
|
+
```ruby
|
39
|
+
config.vm.provision "shell", inline: "echo run playbook install"
|
40
|
+
```
|
41
|
+
|
42
|
+
## Write and publish your own playbook
|
43
|
+
|
44
|
+
*TODO*
|
45
|
+
|
46
|
+
## Coming soon...
|
47
|
+
* Version support
|
48
|
+
|
49
|
+
|
@@ -0,0 +1,15 @@
|
|
1
|
+
Feature: Install
|
2
|
+
|
3
|
+
Scenario: No playbooks file
|
4
|
+
Given there is no "playbooks.yml" in the current directory
|
5
|
+
When I run `playbook install`
|
6
|
+
Then the exit status should not be 0
|
7
|
+
And the output should contain:
|
8
|
+
"""
|
9
|
+
No "playbooks.yml" file found.
|
10
|
+
"""
|
11
|
+
|
12
|
+
Scenario: Valid playbooks file
|
13
|
+
Given there is a valid "playbooks.yml" in the current directory
|
14
|
+
When I run `playbook install`
|
15
|
+
Then the playbooks should be fetched
|
@@ -0,0 +1,12 @@
|
|
1
|
+
Given "there is no \"playbooks.yml\" in the current directory" do
|
2
|
+
# nothing
|
3
|
+
end
|
4
|
+
|
5
|
+
Given "there is a valid \"playbooks.yml\" in the current directory" do
|
6
|
+
playbooks_file = "#{File.dirname(__FILE__)}/../support/playbooks.yml"
|
7
|
+
FileUtils.cp playbooks_file, Dir.pwd
|
8
|
+
end
|
9
|
+
|
10
|
+
Then "the playbooks should be fetched" do
|
11
|
+
|
12
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'aruba/cucumber'
|
@@ -0,0 +1 @@
|
|
1
|
+
- schickling/nginx-playbook
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'yaml'
|
2
|
+
require 'git'
|
3
|
+
|
4
|
+
class Install
|
5
|
+
def self.run
|
6
|
+
|
7
|
+
unless File.exist?("playbooks.yml")
|
8
|
+
puts "No \"playbooks.yml\" file found."
|
9
|
+
exit 1
|
10
|
+
end
|
11
|
+
|
12
|
+
|
13
|
+
playbooks = YAML.load_file("playbooks.yml")
|
14
|
+
|
15
|
+
FileUtils.rm_rf "playbooks"
|
16
|
+
FileUtils.mkdir_p "playbooks"
|
17
|
+
Dir.chdir "playbooks"
|
18
|
+
|
19
|
+
playbooks.each do |playbook|
|
20
|
+
git_url = "https://github.com/#{playbook}.git"
|
21
|
+
repo = Git.clone(git_url, playbook)
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
end
|
data/playbook.gemspec
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Gem::Specification.new do |gem|
|
2
|
+
gem.name = "playbook"
|
3
|
+
gem.version = "0.0.3"
|
4
|
+
gem.summary = "Ansible playbook manager"
|
5
|
+
gem.description = "Ansible playbook manager - The simple way to install playbooks"
|
6
|
+
gem.authors = ["Johannes Schickling"]
|
7
|
+
gem.email = "schickling.j@gmail.com"
|
8
|
+
gem.homepage = "https://github.com/schickling/playbook"
|
9
|
+
gem.files = `git ls-files`.split("\n")
|
10
|
+
gem.license = "MIT"
|
11
|
+
|
12
|
+
gem.executables = ["playbook"]
|
13
|
+
gem.require_paths = ["lib"]
|
14
|
+
|
15
|
+
gem.add_dependency "git", ">= 1.2.6"
|
16
|
+
|
17
|
+
gem.add_development_dependency "rspec"
|
18
|
+
gem.add_development_dependency "cucumber"
|
19
|
+
gem.add_development_dependency "aruba"
|
20
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: playbook
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Johannes Schickling
|
@@ -73,7 +73,20 @@ executables:
|
|
73
73
|
extensions: []
|
74
74
|
extra_rdoc_files: []
|
75
75
|
files:
|
76
|
+
- .gitignore
|
77
|
+
- .travis.yml
|
78
|
+
- Gemfile
|
79
|
+
- README.md
|
76
80
|
- bin/playbook
|
81
|
+
- features/init.feature
|
82
|
+
- features/install.feature
|
83
|
+
- features/step_definitions/init_steps.rb
|
84
|
+
- features/step_definitions/install_steps.rb
|
85
|
+
- features/support/env.rb
|
86
|
+
- features/support/playbooks.yml
|
87
|
+
- lib/playbook/init.rb
|
88
|
+
- lib/playbook/install.rb
|
89
|
+
- playbook.gemspec
|
77
90
|
homepage: https://github.com/schickling/playbook
|
78
91
|
licenses:
|
79
92
|
- MIT
|