knife-sharp 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,19 +1,31 @@
1
1
  logging:
2
2
  enabled: true
3
3
  destination: "~/.chef/sharp.log"
4
+
4
5
  global:
6
+ # chef git repo root
5
7
  git_cookbook_path: "/home/nico/sysadmin/chef/"
8
+ # backup dir for knife sharp backup
6
9
  backupdir: "/home/nico/.chef/sharp/backups/"
10
+
11
+ # Currently only hubot notifications supported
7
12
  notification:
8
13
  hubot:
9
14
  enabled: true
10
15
  url: "http://your.hubot.lan:18080/hubot/chef/bump/"
11
16
  channel: "foo"
12
17
  username: "Nicolas"
18
+ # don't notify if updates are done on development chef
13
19
  skip: [dev]
20
+
21
+ # ignore cookbooks/data bags/roles depending on chef server
14
22
  # key is the name of your server (in a knife sharp server sense)
15
23
  sandboxnico:
16
- ignore_cookbooks: [ "tests" ]
24
+ ignore_cookbooks: [ tests ]
25
+ ignore_databags: [ staff/admin, infrastructure/mail ]
26
+ ignore_roles: [ webserver ]
27
+
28
+ # store modifications of each deploy, to allow rollback
17
29
  rollback:
18
30
  enabled: true
19
31
  destination: "/home/nico/.chef/sharp/rollbacks/"
@@ -282,6 +282,13 @@ module KnifeSharp
282
282
  end
283
283
  end
284
284
 
285
+ if @cfg[@chef_server] and @cfg[@chef_server].has_key?("ignore_databags")
286
+ (updated_dbs.keys.map{|k| k.join("/")} & @cfg[@chef_server]["ignore_databags"]).each do |db|
287
+ updated_dbs.delete(db.split("/"))
288
+ ui.msg "* Skipping #{db} data bag (ignore list)"
289
+ end
290
+ end
291
+
285
292
  if !updated_dbs.empty?
286
293
  all = false
287
294
  updated_dbs.each do |name, obj|
@@ -390,6 +397,13 @@ module KnifeSharp
390
397
  ui.msg("* #{role} role is not up-to-date (#{diffs.join(",")})") unless diffs.empty?
391
398
  end
392
399
 
400
+ if @cfg[@chef_server] and @cfg[@chef_server].has_key?("ignore_roles")
401
+ (updated_roles.keys & @cfg[@chef_server]["ignore_roles"]).each do |r|
402
+ updated_roles.delete(r)
403
+ ui.msg "* Skipping #{r} role (ignore list)"
404
+ end
405
+ end
406
+
393
407
  if !updated_roles.empty?
394
408
  all = false
395
409
  updated_roles.each do |name, obj|
@@ -1,3 +1,3 @@
1
1
  module KnifeSharp
2
- VERSION = "0.3.0"
2
+ VERSION = "0.4.0"
3
3
  end
metadata CHANGED
@@ -1,66 +1,57 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: knife-sharp
3
- version: !ruby/object:Gem::Version
4
- hash: 19
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.4.0
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 3
9
- - 0
10
- version: 0.3.0
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Nicolas Szalay
14
9
  - Jonathan Amiez
15
10
  autorequire:
16
11
  bindir: bin
17
12
  cert_chain: []
18
-
19
- date: 2013-06-05 00:00:00 Z
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
13
+ date: 2013-06-06 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
22
16
  name: chef
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
17
+ requirement: !ruby/object:Gem::Requirement
25
18
  none: false
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- hash: 119
30
- segments:
31
- - 10
32
- - 14
33
- - 0
19
+ requirements:
20
+ - - ! '>='
21
+ - !ruby/object:Gem::Version
34
22
  version: 10.14.0
35
23
  type: :runtime
36
- version_requirements: *id001
37
- - !ruby/object:Gem::Dependency
38
- name: grit
39
24
  prerelease: false
40
- requirement: &id002 !ruby/object:Gem::Requirement
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ none: false
27
+ requirements:
28
+ - - ! '>='
29
+ - !ruby/object:Gem::Version
30
+ version: 10.14.0
31
+ - !ruby/object:Gem::Dependency
32
+ name: grit
33
+ requirement: !ruby/object:Gem::Requirement
41
34
  none: false
42
- requirements:
35
+ requirements:
43
36
  - - ~>
44
- - !ruby/object:Gem::Version
45
- hash: 27
46
- segments:
47
- - 2
48
- - 5
49
- - 0
37
+ - !ruby/object:Gem::Version
50
38
  version: 2.5.0
51
39
  type: :runtime
52
- version_requirements: *id002
40
+ prerelease: false
41
+ version_requirements: !ruby/object:Gem::Requirement
42
+ none: false
43
+ requirements:
44
+ - - ~>
45
+ - !ruby/object:Gem::Version
46
+ version: 2.5.0
53
47
  description: Sharpen your knife
54
- email:
48
+ email:
55
49
  - nico@rottenbytes.info
56
50
  - jonathan.amiez@gmail.com
57
51
  executables: []
58
-
59
52
  extensions: []
60
-
61
53
  extra_rdoc_files: []
62
-
63
- files:
54
+ files:
64
55
  - README.md
65
56
  - ext/sharp-config.yml
66
57
  - lib/knife-sharp.rb
@@ -71,36 +62,26 @@ files:
71
62
  - lib/chef/knife/sharp-rollback.rb
72
63
  homepage: https://github.com/Fotolia/knife-sharp
73
64
  licenses: []
74
-
75
65
  post_install_message:
76
66
  rdoc_options: []
77
-
78
- require_paths:
67
+ require_paths:
79
68
  - lib
80
- required_ruby_version: !ruby/object:Gem::Requirement
69
+ required_ruby_version: !ruby/object:Gem::Requirement
81
70
  none: false
82
- requirements:
83
- - - ">="
84
- - !ruby/object:Gem::Version
85
- hash: 3
86
- segments:
87
- - 0
88
- version: "0"
89
- required_rubygems_version: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ! '>='
73
+ - !ruby/object:Gem::Version
74
+ version: '0'
75
+ required_rubygems_version: !ruby/object:Gem::Requirement
90
76
  none: false
91
- requirements:
92
- - - ">="
93
- - !ruby/object:Gem::Version
94
- hash: 3
95
- segments:
96
- - 0
97
- version: "0"
77
+ requirements:
78
+ - - ! '>='
79
+ - !ruby/object:Gem::Version
80
+ version: '0'
98
81
  requirements: []
99
-
100
82
  rubyforge_project:
101
- rubygems_version: 1.8.24
83
+ rubygems_version: 1.8.25
102
84
  signing_key:
103
85
  specification_version: 3
104
86
  summary: Knife sharp plugin
105
87
  test_files: []
106
-