Create superuser with  postgres::server::role.
Install the postgresql-contrib package in Puppet.