Skip to content

Commit c35f4c3

Browse files
committed
remove unnecessary logic
1 parent f5f63e5 commit c35f4c3

File tree

2 files changed

+5
-13
lines changed

2 files changed

+5
-13
lines changed

providers/default.rb

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# Author:: LLC Express 42 (info@express42.com)
66
#
7-
# Copyright (C) 2012-2013 LLC Express 42
7+
# Copyright (C) 2012-2014 LLC Express 42
88
#
99
# Permission is hereby granted, free of charge, to any person obtaining a copy of
1010
# this software and associated documentation files (the "Software"), to deal in
@@ -105,11 +105,7 @@ def whyrun_supported?
105105
group 'postgres'
106106
mode 0644
107107
variables configuration: configuration, cluster_name: cluster_name
108-
if new_resource.cookbook
109-
cookbook new_resource.cookbook
110-
else
111-
cookbook 'postgresql'
112-
end
108+
cookbook new_resource.cookbook
113109
notifies :create, 'ruby_block[restart_service]', :delayed
114110
end
115111

@@ -119,11 +115,7 @@ def whyrun_supported?
119115
group 'postgres'
120116
mode 0644
121117
variables configuration: hba_configuration
122-
if new_resource.cookbook
123-
cookbook new_resource.cookbook
124-
else
125-
cookbook 'postgresql'
126-
end
118+
cookbook new_resource.cookbook
127119
notifies :create, 'ruby_block[restart_service]', :delayed
128120
end
129121

resources/default.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# Author:: LLC Express 42 (info@express42.com)
66
#
7-
# Copyright (C) 2012-2013 LLC Express 42
7+
# Copyright (C) 2012-2014 LLC Express 42
88
#
99
# Permission is hereby granted, free of charge, to any person obtaining a copy of
1010
# this software and associated documentation files (the "Software"), to deal in
@@ -29,7 +29,7 @@
2929
default_action :create
3030

3131
attribute :cluster_name, kind_of: String, name_attribute: true
32-
attribute :cookbook, kind_of: String
32+
attribute :cookbook, kind_of: String, default: "postgresql"
3333
attribute :cluster_create_options, kind_of: Hash, default: {}
3434
attribute :configuration, kind_of: Hash, default: {}
3535
attribute :hba_configuration, kind_of: Array, default: []

0 commit comments

Comments
 (0)