Revert "pgsql::database::populate: require module `grep'"

This reverts commit 9bb68c42a0169220d92a6c3408c7416f90529877.

Conflicts:
	.vagrant-puppet/modules/pgsql/manifests/database/populate.pp
This commit is contained in:
Alexander Klimov 2014-09-11 10:18:18 +02:00
parent 0b1f3183ad
commit dc28f53033

View File

@ -11,7 +11,6 @@
# Requires: # Requires:
# #
# pgsql::database::create # pgsql::database::create
# grep
# #
# Sample Usage: # Sample Usage:
# #
@ -22,8 +21,6 @@
# } # }
# #
define pgsql::database::populate ($username, $password, $schemafile) { define pgsql::database::populate ($username, $password, $schemafile) {
include grep
Exec { path => '/bin:/usr/bin' } Exec { path => '/bin:/usr/bin' }
pgsql::database::create { $name: pgsql::database::create { $name:
@ -35,9 +32,6 @@ define pgsql::database::populate ($username, $password, $schemafile) {
onlyif => "psql -U ${username} -d ${name} -c \"SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = '${name}';\" 2>/dev/null |grep -qEe '^ *0 *$'", onlyif => "psql -U ${username} -d ${name} -c \"SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = '${name}';\" 2>/dev/null |grep -qEe '^ *0 *$'",
command => "psql -U ${username} -d ${name} < ${schemafile}", command => "psql -U ${username} -d ${name} < ${schemafile}",
user => 'postgres', user => 'postgres',
require => [ require => Pgsql::Database::Create[$name],
Pgsql::Database::Create[$name],
Class['grep']
],
} }
} }