hyperwaverelay 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.rspec +2 -0
- data/.travis.yml +3 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +42 -0
- data/Rakefile +1 -0
- data/bin/console +14 -0
- data/bin/hwr +4 -0
- data/bin/setup +7 -0
- data/hyperwaverelay.gemspec +31 -0
- data/lib/hyperwaverelay/templates/ansible.cfg.tt +7 -0
- data/lib/hyperwaverelay/version.rb +3 -0
- data/lib/hyperwaverelay.rb +39 -0
- metadata +116 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 1d3db0440a61b2e75f37b563f0331f390bc82102
|
4
|
+
data.tar.gz: 368558a67d4c766d7357f7d9e97247331f1d80d8
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 049531c5e7ff041521b56a7194096ce913e552271e869994969e139a40826c8c412b6b062c4df17f5a95c81c412beda4c290fcb4e53659e841f69a80fe868c7d
|
7
|
+
data.tar.gz: 1e8823d54ac62f996a6cea04f11e88d5e6184340690799db23fc3d3faaa858ef3d57f1bf98ab85fdde222f54c4199181fef9665ff6daa795df88cad44b91ddef
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 TODO: Write your name
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
# Hyperwaverelay
|
2
|
+
|
3
|
+
Ansible Project Templating
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'hyperwaverelay'
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install hyperwaverelay
|
20
|
+
|
21
|
+
|
22
|
+
## Usage
|
23
|
+
|
24
|
+
Hyperwave relay is an executable. run:
|
25
|
+
|
26
|
+
$ hwr help
|
27
|
+
|
28
|
+
For usage
|
29
|
+
|
30
|
+
## Development
|
31
|
+
|
32
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.
|
33
|
+
|
34
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
35
|
+
|
36
|
+
## Contributing
|
37
|
+
|
38
|
+
1. Fork it ( https://github.com/[my-github-username]/hyperwaverelay/fork )
|
39
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
40
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
41
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
42
|
+
5. Create a new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "hyperwaverelay"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/hwr
ADDED
data/bin/setup
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'hyperwaverelay/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "hyperwaverelay"
|
8
|
+
spec.version = Hyperwaverelay::VERSION
|
9
|
+
spec.authors = ["Mike Danko"]
|
10
|
+
spec.email = ["mike@l4m3.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{Ansible Project Scaffolding}
|
13
|
+
spec.description = %q{Create and manage scaffolding for Ansible projects}
|
14
|
+
spec.homepage = "https://github.com/skord/hyperwaverelay"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
|
+
spec.bindir = "bin"
|
19
|
+
spec.executables << "hwr"
|
20
|
+
spec.require_paths = ["lib"]
|
21
|
+
|
22
|
+
if spec.respond_to?(:metadata)
|
23
|
+
spec.metadata['allowed_push_host'] = "https://rubygems.org"
|
24
|
+
end
|
25
|
+
|
26
|
+
spec.add_development_dependency "bundler", "~> 1.9"
|
27
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
28
|
+
|
29
|
+
spec.add_dependency "thor", "~> 0.19.1"
|
30
|
+
spec.add_dependency "sshkey", "~> 1.6.1"
|
31
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
[defaults]
|
2
|
+
ansible_managed = Ansible Managed: {file} modified on %Y-%m-%d %H:%M:%S by {uid} on {host}
|
3
|
+
vault_password_file = .vault_password
|
4
|
+
<% if options[:disable_host_key_checking] %>host_key_checking = False <% end %>
|
5
|
+
<% if options[:remote_user] %>remote_user = <%= options[:remote_user] %><% end %>
|
6
|
+
<% if options[:inventory] %>inventory = <%= options[:inventory] %><% end %>
|
7
|
+
private_key_file = <%= ENV['HOME'] %>/.ssh/ansible_deploy
|
@@ -0,0 +1,39 @@
|
|
1
|
+
require "bundler/setup"
|
2
|
+
require "hyperwaverelay/version"
|
3
|
+
require "securerandom"
|
4
|
+
require "thor"
|
5
|
+
require 'sshkey'
|
6
|
+
|
7
|
+
module Hyperwaverelay
|
8
|
+
class Cli < Thor
|
9
|
+
include Thor::Actions
|
10
|
+
def self.source_root
|
11
|
+
File.dirname(__FILE__)
|
12
|
+
end
|
13
|
+
desc "bootstrap project_name", "bootstrap your project"
|
14
|
+
option :remote_user
|
15
|
+
option :inventory
|
16
|
+
option :disable_host_key_checking, type: :boolean
|
17
|
+
def bootstrap(name)
|
18
|
+
empty_directory(name)
|
19
|
+
["group_vars","host_vars","roles"].each do |dir|
|
20
|
+
empty_directory("#{name}/#{dir}")
|
21
|
+
end
|
22
|
+
create_file "#{name}/.vault_password" do
|
23
|
+
SecureRandom::base64(20)
|
24
|
+
end
|
25
|
+
create_file "#{name}/group_vars/all" do
|
26
|
+
"---\n"
|
27
|
+
end
|
28
|
+
key = ::SSHKey.generate
|
29
|
+
create_file "#{ENV['HOME']}/.ssh/ansible_deploy" do
|
30
|
+
key.private_key
|
31
|
+
end
|
32
|
+
create_file "#{ENV['HOME']}/.ssh/ansible_deploy.pub" do
|
33
|
+
key.ssh_public_key
|
34
|
+
end
|
35
|
+
template "hyperwaverelay/templates/ansible.cfg.tt", "#{name}/ansible.cfg"
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
metadata
ADDED
@@ -0,0 +1,116 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: hyperwaverelay
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Mike Danko
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-05-14 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.9'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.9'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: thor
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.19.1
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.19.1
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: sshkey
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 1.6.1
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 1.6.1
|
69
|
+
description: Create and manage scaffolding for Ansible projects
|
70
|
+
email:
|
71
|
+
- mike@l4m3.com
|
72
|
+
executables:
|
73
|
+
- hwr
|
74
|
+
extensions: []
|
75
|
+
extra_rdoc_files: []
|
76
|
+
files:
|
77
|
+
- ".gitignore"
|
78
|
+
- ".rspec"
|
79
|
+
- ".travis.yml"
|
80
|
+
- Gemfile
|
81
|
+
- LICENSE.txt
|
82
|
+
- README.md
|
83
|
+
- Rakefile
|
84
|
+
- bin/console
|
85
|
+
- bin/hwr
|
86
|
+
- bin/setup
|
87
|
+
- hyperwaverelay.gemspec
|
88
|
+
- lib/hyperwaverelay.rb
|
89
|
+
- lib/hyperwaverelay/templates/ansible.cfg.tt
|
90
|
+
- lib/hyperwaverelay/version.rb
|
91
|
+
homepage: https://github.com/skord/hyperwaverelay
|
92
|
+
licenses:
|
93
|
+
- MIT
|
94
|
+
metadata:
|
95
|
+
allowed_push_host: https://rubygems.org
|
96
|
+
post_install_message:
|
97
|
+
rdoc_options: []
|
98
|
+
require_paths:
|
99
|
+
- lib
|
100
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - ">="
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '0'
|
105
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - ">="
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
requirements: []
|
111
|
+
rubyforge_project:
|
112
|
+
rubygems_version: 2.4.5
|
113
|
+
signing_key:
|
114
|
+
specification_version: 4
|
115
|
+
summary: Ansible Project Scaffolding
|
116
|
+
test_files: []
|