Add an alias to access psql db

This commit is contained in:
Monocots 2022-10-25 19:06:30 +00:00
parent 9f60595d65
commit 00ec9c9b8e
2 changed files with 9 additions and 0 deletions

View file

@ -13,6 +13,7 @@
class rhizo_base::users {
$password_hash = $rhizo_base::password_hash
$pgsql_pwd = $rhizo_base::pgsql_pwd
user { 'rhizomatica':
ensure => present,
@ -46,4 +47,11 @@ class rhizo_base::users {
mode => '0600'
}
file { '/home/tic/.bash_aliases':
content => template('rhizo_base/bash_aliases.erb'),
owner => 'tic',
group => 'tic',
mode => '0640'
}
}

View file

@ -0,0 +1 @@
alias psql='psql postgresql://rhizomatica:<%= @pgsql_pwd %>@localhost/rhizomatica'