Skip to content

Commit

Permalink
move password generation from attributes file to recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
jtimberman committed Nov 18, 2011
1 parent 94de56d commit 0d6d92d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
6 changes: 0 additions & 6 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
# limitations under the License.
#

::Chef::Node::Attribute.send(:include, Opscode::OpenSSL::Password)

case platform
when "debian"

Expand Down Expand Up @@ -72,7 +70,3 @@
default[:postgresql][:version] = "8.4"
set[:postgresql][:dir] = "/etc/postgresql/#{node[:postgresql][:version]}/main"
end

# generate all passwords
default[:postgresql][:password][:postgres] = secure_password

5 changes: 5 additions & 0 deletions recipes/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,13 @@
# limitations under the License.
#

::Chef::Recipe.send(:include, Opscode::OpenSSL::Password)

include_recipe "postgresql::client"

# randomly generate postgres password
default[:postgresql][:password][:postgres] = secure_password

case node[:postgresql][:version]
when "8.3"
node.default[:postgresql][:ssl] = "off"
Expand Down

0 comments on commit 0d6d92d

Please sign in to comment.