dust-deploy 0.3.2 → 0.3.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.
- data/bin/dust +7 -1
- data/changelog.md +8 -0
- data/lib/dust/recipes/iptables.rb +2 -0
- data/lib/dust/server.rb +1 -5
- data/lib/dust/version.rb +1 -1
- metadata +3 -3
data/bin/dust
CHANGED
@@ -5,6 +5,7 @@ require 'thor/runner'
|
|
5
5
|
require 'thor/util'
|
6
6
|
require 'yaml'
|
7
7
|
require 'fileutils'
|
8
|
+
require 'ipaddress'
|
8
9
|
require 'dust'
|
9
10
|
|
10
11
|
module Dust
|
@@ -216,7 +217,12 @@ module Dust
|
|
216
217
|
|
217
218
|
# create a new field with the fully qualified domain name
|
218
219
|
n['fqdn'] = hostname
|
219
|
-
|
220
|
+
|
221
|
+
# if hostname is a valid ip address, don't add domain
|
222
|
+
# so we can connect via ip address only
|
223
|
+
unless IPAddress.valid? hostname and n['domain']
|
224
|
+
n['fqdn'] += '.' + n['domain']
|
225
|
+
end
|
220
226
|
|
221
227
|
# pass command line proxy option
|
222
228
|
n['proxy'] = options[:proxy] if options[:proxy]
|
data/changelog.md
CHANGED
@@ -1,6 +1,14 @@
|
|
1
1
|
Changelog
|
2
2
|
=============
|
3
3
|
|
4
|
+
0.3.3
|
5
|
+
------------
|
6
|
+
|
7
|
+
- fixes iptables bug, DENY policy target only allowed for filter table
|
8
|
+
- if hostname is an ip, domain will be ignored while connecting.
|
9
|
+
this fixes a conncetion issue, when hostname is an ip address and domain is specified nonetheless
|
10
|
+
|
11
|
+
|
4
12
|
0.3.2
|
5
13
|
------------
|
6
14
|
|
@@ -111,6 +111,8 @@ class Iptables < Thor
|
|
111
111
|
# returns DROP if chain and table is specified in config file
|
112
112
|
# ACCEPT if not
|
113
113
|
def get_chain_policy table, chain
|
114
|
+
# only filter table supports DENY target
|
115
|
+
return 'ACCEPT' unless table == 'filter'
|
114
116
|
return 'ACCEPT' unless @rules[chain.downcase]
|
115
117
|
|
116
118
|
@rules[chain.downcase].values.each do |rule|
|
data/lib/dust/server.rb
CHANGED
@@ -10,10 +10,6 @@ module Dust
|
|
10
10
|
def initialize attr
|
11
11
|
@attr = attr
|
12
12
|
|
13
|
-
# store fully qualified domain name
|
14
|
-
@attr['fqdn'] = @attr['hostname']
|
15
|
-
@attr['fqdn'] += '.' + @attr['domain'] if @attr['domain']
|
16
|
-
|
17
13
|
@attr['user'] ||= 'root'
|
18
14
|
@attr['port'] ||= 22
|
19
15
|
@attr['password'] ||= ''
|
@@ -35,7 +31,7 @@ module Dust
|
|
35
31
|
:port => @attr['port'],
|
36
32
|
:proxy => proxy }
|
37
33
|
rescue Exception
|
38
|
-
error_message = "
|
34
|
+
error_message = "coudln't connect to #{@attr['fqdn']}"
|
39
35
|
error_message += " (via socks5 proxy #{@attr['proxy']})" if proxy
|
40
36
|
Dust.print_failed error_message
|
41
37
|
return false
|
data/lib/dust/version.rb
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 3
|
8
|
-
-
|
9
|
-
version: 0.3.
|
8
|
+
- 3
|
9
|
+
version: 0.3.3
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- kris kechagia
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2012-01-
|
17
|
+
date: 2012-01-15 00:00:00 +01:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|