catfish 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/.vagrant/machines/10.52.100.79/managed/id +1 -0
- data/.vagrant/machines/10.52.100.79/managed/index_uuid +1 -0
- data/.vagrant/machines/10.52.101.106/managed/id +1 -0
- data/.vagrant/machines/10.52.101.106/managed/index_uuid +1 -0
- data/README.md +0 -1
- data/Rakefile +3 -0
- data/lib/catfish/cli/init.rb +6 -2
- data/lib/catfish/cli.rb +4 -0
- data/lib/catfish/templates/Catfishfile.tt +3 -0
- data/lib/catfish/templates/Vagrantfile.tt +20 -13
- data/lib/catfish/version.rb +1 -1
- metadata +5 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74963910c0c501a10a4eb5c44ad4de8c95d25be9
|
4
|
+
data.tar.gz: 1041ab59f8293a410d06cd0b868085b839b9bfdf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f26cc28d1d4b64ed91237f95f9c4397efd660796139e4fddf91e4f6eee007c1cd706881a504f4eff8ce9bd9374945b9749cccb07102cf17f3ea23649200bd87f
|
7
|
+
data.tar.gz: deb1cac85cd409ab9cae112b973daaaad7ad8d8fa991f2a9b1539b91bfc4f0e97a695ae5a2a21cdc747f0b6110d42b9f1a73271e18561149da6d338f3e911949
|
@@ -0,0 +1 @@
|
|
1
|
+
10.52.100.79
|
@@ -0,0 +1 @@
|
|
1
|
+
43c409ec41664be6a0323efe51fadc38
|
@@ -0,0 +1 @@
|
|
1
|
+
10.52.101.106
|
@@ -0,0 +1 @@
|
|
1
|
+
64a8ed314d0748a9b5567f5e122dad48
|
data/README.md
CHANGED
data/Rakefile
CHANGED
data/lib/catfish/cli/init.rb
CHANGED
@@ -17,10 +17,14 @@ module Catfish
|
|
17
17
|
}
|
18
18
|
|
19
19
|
opts = {
|
20
|
+
provisioners: options[:provisioners] || [],
|
21
|
+
shell_paths: options['shell-paths'] || ['{{PATH_TO_YOUR_SCRIPT}}'],
|
22
|
+
communicator: options[:communicator] || 'ssh',
|
23
|
+
winrm_username: options['winrm-username'] || '{{YOUR_WINRM_USERNAME}}',
|
24
|
+
winrm_password: options['winrm-password'] || '{{YOUR_WINRM_PASSWORD}}',
|
20
25
|
ssh_username: options['ssh-username'] || '{{YOUR_SSH_USERNAME}}',
|
21
26
|
ssh_private_key_path: options['ssh-private-key-path'] || '{{PATH_TO_YOUR_SSH_PRIVATE_KEY}}',
|
22
|
-
|
23
|
-
shell_paths: options['shell-paths'] || ['{{PATH_TO_YOUR_SCRIPT}}']
|
27
|
+
servers: options['servers'] || []
|
24
28
|
}
|
25
29
|
|
26
30
|
templates.each do |src, dst|
|
data/lib/catfish/cli.rb
CHANGED
@@ -31,9 +31,13 @@ module Catfish
|
|
31
31
|
TODO: Long description
|
32
32
|
D
|
33
33
|
method_option 'provisioners', type: :array, banner: 'A list of vagrant provisiners to use'
|
34
|
+
method_option 'communicator', type: :string, banner: 'The communicator. ssh (default) or winrm'
|
35
|
+
method_option 'winrm-username', type: :string, banner: 'Username for winrm. Used with --communicator=winrm'
|
36
|
+
method_option 'winrm-password', type: :string, banner: 'Password for winrm. Used with --communicator=winrm'
|
34
37
|
method_option 'shell-paths', type: :array, banner: 'A list of paths to use if shell provisioning is selected'
|
35
38
|
method_option 'ssh-username', type: :string, banner: 'SSH username'
|
36
39
|
method_option 'ssh-private-key-path', type: :string, banner: 'Path to SSH private key'
|
40
|
+
method_option 'servers', type: :array, banner: 'Initial list of servers to include in Catfishfile'
|
37
41
|
def init
|
38
42
|
require 'catfish/cli/init'
|
39
43
|
Init.new(options.dup, self).run
|
@@ -3,24 +3,31 @@
|
|
3
3
|
|
4
4
|
Vagrant.configure("2") do |config|
|
5
5
|
|
6
|
-
|
6
|
+
config.vm.box = "tknerr/managed-server-dummy"
|
7
7
|
<% config[:provisioners].each do |provisioner| -%>
|
8
8
|
<% if provisioner == 'shell' -%>
|
9
9
|
<% config[:shell_paths].each do |path| -%>
|
10
|
-
|
10
|
+
config.vm.provision 'shell', path: '<%= path %>'
|
11
11
|
<% end -%>
|
12
12
|
<% end -%>
|
13
13
|
<% end -%>
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
15
|
+
<% if config[:communicator] == 'winrm' -%>
|
16
|
+
config.vm.communicator = '<%= config[:communicator] %>'
|
17
|
+
config.vm.winrm.username = '<%= config[:winrm_username] %>'
|
18
|
+
config.vm.winrm.password = '<%= config[:winrm_password] %>'
|
19
|
+
<% end -%>
|
20
|
+
|
21
|
+
instances = File.readlines('Catfishfile.lock').map(&:chomp)
|
22
|
+
instances.each do |instance|
|
23
|
+
config.vm.define "#{instance}" do |box|
|
24
|
+
box.vm.provider :managed do |managed, override|
|
25
|
+
managed.server = instance
|
26
|
+
<% if config[:communicator] == 'ssh' -%>
|
27
|
+
override.ssh.username = '<%= config[:ssh_username] %>'
|
28
|
+
override.ssh.private_key_path = '<%= config[:ssh_private_key_path] %>'
|
29
|
+
<% end -%>
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
26
33
|
end
|
data/lib/catfish/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: catfish
|
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
|
- Christopher Baldauf
|
@@ -76,6 +76,10 @@ extra_rdoc_files: []
|
|
76
76
|
files:
|
77
77
|
- .gitignore
|
78
78
|
- .rubocop.yml
|
79
|
+
- .vagrant/machines/10.52.100.79/managed/id
|
80
|
+
- .vagrant/machines/10.52.100.79/managed/index_uuid
|
81
|
+
- .vagrant/machines/10.52.101.106/managed/id
|
82
|
+
- .vagrant/machines/10.52.101.106/managed/index_uuid
|
79
83
|
- Gemfile
|
80
84
|
- LICENSE
|
81
85
|
- README.md
|