dust-deploy 0.6.0 → 0.6.1

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/changelog.md CHANGED
@@ -1,6 +1,13 @@
1
1
  Changelog
2
2
  =============
3
3
 
4
+ 0.6.1
5
+ ------------
6
+
7
+ - adds cups_client recipe
8
+ - @node.get_home uses 'getent passwd' now instead of '/etc/passwd'
9
+
10
+
4
11
  0.6.0
5
12
  ------------
6
13
 
@@ -46,7 +46,7 @@ module Dust
46
46
  print_msg "\n[ #{blue}#{hostname}#{none} ]\n\n", options
47
47
  end
48
48
 
49
- def self.print_recipe recipe, options={:quiet => false, :indent => 1}
49
+ def self.print_recipe recipe, options={:quiet => false, :indent => 0}
50
50
  print_msg "#{green}|#{recipe}|#{none}\n", options
51
51
  end
52
52
 
@@ -0,0 +1,27 @@
1
+ class CupsClient < Recipe
2
+ desc 'cups_client:deploy', 'maintains /etc/cups/client.conf'
3
+ def deploy
4
+ return false unless install
5
+
6
+ return ::Dust.print_failed 'no printserver specified.' unless @config
7
+
8
+ ::Dust.print_ok "setting servername to: #{@config}"
9
+ @node.write '/etc/cups/client.conf', "ServerName #{@config}\n"
10
+ end
11
+
12
+
13
+ private
14
+
15
+ def install
16
+ if @node.uses_apt?
17
+ return false unless @node.install_package 'cups-client'
18
+ return false unless @node.install_package 'cups-bsd'
19
+
20
+ elsif @node.uses_rpm?
21
+ return false unless @node.install_package 'cups'
22
+ end
23
+
24
+ true
25
+ end
26
+ end
27
+
data/lib/dust/server.rb CHANGED
@@ -203,7 +203,7 @@ module Dust
203
203
  return Dust.print_ok "package #{package} already installed"
204
204
  end
205
205
 
206
- Dust.print_msg "installing #{package}", :indent => options[:indent] + 1
206
+ Dust.print_msg "installing #{package}"
207
207
 
208
208
  if uses_apt?
209
209
  exec "DEBIAN_FRONTEND=noninteractive aptitude install -y #{package}"
@@ -434,7 +434,7 @@ module Dust
434
434
  options = default_options(:quiet => true).merge options
435
435
 
436
436
  Dust.print_msg "getting home directory of #{user}"
437
- ret = exec "grep '^#{user}' /etc/passwd |cut -d':' -f6"
437
+ ret = exec "getent passwd |grep '^#{user}' |cut -d':' -f6"
438
438
  if Dust.print_result ret[:exit_code]
439
439
  return ret[:stdout].chomp
440
440
  else
data/lib/dust/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Dust
2
- VERSION = "0.6.0"
2
+ VERSION = "0.6.1"
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 6
8
- - 0
9
- version: 0.6.0
8
+ - 1
9
+ version: 0.6.1
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-30 00:00:00 +01:00
17
+ date: 2012-01-31 00:00:00 +01:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -123,6 +123,7 @@ files:
123
123
  - lib/dust/recipe.rb
124
124
  - lib/dust/recipes/aliases.rb
125
125
  - lib/dust/recipes/basic_setup.rb
126
+ - lib/dust/recipes/cups_client.rb
126
127
  - lib/dust/recipes/debsecan.rb
127
128
  - lib/dust/recipes/duplicity.rb
128
129
  - lib/dust/recipes/etc_hosts.rb