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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d41a495702d29accb85208d2e06ca916eeaf0a83
4
- data.tar.gz: 2374dcdd205285e8f990125d01d8a26103f440d2
3
+ metadata.gz: 4f6e43a206165e1c1331e870bda95e6f3a20a9c9
4
+ data.tar.gz: f62e521a8d2e843c8b2aa5bbfed25dccd43d0516
5
5
  SHA512:
6
- metadata.gz: e23ac468508fe458809509b674f6baaf9846ba4dc4ccef18d4982116a309c5d4cff96b6ec1bea0a8b206442e8f77de60555900ee7e31e5457337fecfbe527402
7
- data.tar.gz: c38d6c7e5060376842230b34c8303e325c6e85d0f69410da007c8b95c045237c4b1eff2699da113442c18b3a3d0ced476cf27669ad5556c73aa5cc98c4d2b2d1
6
+ metadata.gz: 64eb8a56a486f2352641bd567ff8ded1ac3acf1cd04867465560398dd9d839f5c062bfc584ef369328c0f00258d51dd64417e78909d82e6bd38cf55b85e69ec7
7
+ data.tar.gz: fab696ad010975f9501ab9b3b462d7331e47ecff4fa04bc3bd002527bd6622c4ff26d1eadad074e2ac3283c5b999fa7dc5e5f0948607c00514905f429dbc9282
data/.gitignore ADDED
@@ -0,0 +1,5 @@
1
+ *.gem
2
+ .DS_Store
3
+ Gemfile.lock
4
+ playbooks.yml
5
+ playbooks/
data/.travis.yml ADDED
@@ -0,0 +1,6 @@
1
+ language: ruby
2
+ rvm:
3
+ - "1.9.2"
4
+ - "2.0.0"
5
+ script:
6
+ bundle exec cucumber
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in capistrano.gemspec
4
+ gemspec
data/README.md ADDED
@@ -0,0 +1,49 @@
1
+ playbook [![Build Status](https://travis-ci.org/schickling/playbook.png?branch=master)](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,6 @@
1
+ Feature: Init
2
+
3
+ Scenario: Run fresh init command
4
+ Given I'm in an empty directory
5
+ When I run `playbook init`
6
+ Then a fresh "playbooks.yml" file should be created
@@ -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,7 @@
1
+ Given "I'm in an empty directory" do
2
+ # nothing
3
+ end
4
+
5
+ Then "a fresh \"playbooks.yml\" file should be created" do
6
+ expect(File.exist?('playbooks.yml')).to be_true
7
+ end
@@ -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,7 @@
1
+ class Init
2
+
3
+ def self.run
4
+ FileUtils.touch('playbooks.yml')
5
+ end
6
+
7
+ end
@@ -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.2
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