knife-scrub 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/chef/knife/scrub_attributes.rb +12 -1
- data/lib/knife-scrub/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ODIyYjQyNjYxYzhlZmJmMDFhMmVkMmM3ZWFjY2JjYzU3NDhmOGM3NA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NDljMjNjNzRkOGJlYzhkNTcwZGM0ZjE0NDQ2MTc1NTYzZDliNmVkNA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
Mjk3NTVlZDQ5MzRlYWIzYjQyODBhZDg2ZDBmMDNkYzFlMjM4OTM1NmNiNzU4
|
10
|
+
MTYzM2M0OTg1ZjkwOTlkMzZmYTNjNzZjMDI5ZGM2YmE5NmRjNDMzZTk4MjBm
|
11
|
+
ZjhhMjlhM2FhN2VlZjAzNDg0ODk4NDNmZTc5NmY5N2RiNGRhNjI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OTc0NGQ3YWY4MjgwYmRiNjZjYTA2YzFhNmU2YmU4ZjJiN2M5YzE1Yzk4NGJh
|
14
|
+
ZmFiN2ZmYmFmYTNjYWVhZTY2MDUyMjYyZGNkNmM3MWZhZTczMGJmMDUyZmEy
|
15
|
+
MjY5NDMyODk0ZTMzNWY2NGNiMmU5YzRlMmNlNzczZTRmZjI0ZmU=
|
@@ -36,6 +36,12 @@ class Chef
|
|
36
36
|
:description => "Limit nodes with provided query. Default: #{DEFAULT_QUERY}",
|
37
37
|
:default => DEFAULT_QUERY
|
38
38
|
|
39
|
+
option :dry_run,
|
40
|
+
:short => '-d',
|
41
|
+
:long => '--dry-run',
|
42
|
+
:description => "Show nodes which have normal attributes",
|
43
|
+
:default => false
|
44
|
+
|
39
45
|
def run
|
40
46
|
unless prefix = name_args.first
|
41
47
|
show_usage
|
@@ -48,11 +54,16 @@ class Chef
|
|
48
54
|
extractor = Scrub::AttributeExtractor.create(node)
|
49
55
|
|
50
56
|
unless extractor.has_key?(prefix)
|
51
|
-
ui.msg format(node, "
|
57
|
+
ui.msg format(node, "normal attribute #{prefix} not present")
|
52
58
|
next
|
53
59
|
end
|
54
60
|
|
55
61
|
value = extractor.fetch(prefix)
|
62
|
+
if config[:dry_run]
|
63
|
+
ui.msg format(node, "normal attribute #{prefix}: #{value.inspect}")
|
64
|
+
next
|
65
|
+
end
|
66
|
+
|
56
67
|
unless ui.confirm format(node, "Do you want to delete #{value.inspect}")
|
57
68
|
next
|
58
69
|
end
|
data/lib/knife-scrub/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: knife-scrub
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tobias Schmidt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-03-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef
|
@@ -74,8 +74,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
74
74
|
version: '0'
|
75
75
|
requirements: []
|
76
76
|
rubyforge_project:
|
77
|
-
rubygems_version: 2.1.
|
77
|
+
rubygems_version: 2.1.11
|
78
78
|
signing_key:
|
79
79
|
specification_version: 4
|
80
80
|
summary: knife plugin to scrub normal attributes of chef-server
|
81
81
|
test_files: []
|
82
|
+
has_rdoc:
|