20 lines
		
	
	
		
			417 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			417 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
| #
 | |
| # Cookbook Name:: kosmos-bitcoin
 | |
| # Recipe:: nbxplorer-go_pg_db
 | |
| #
 | |
| 
 | |
| credentials = data_bag_item('credentials', 'nbxplorer')
 | |
| 
 | |
| postgres_user = node['nbxplorer']['postgres']['user']
 | |
| postgres_db   = node['nbxplorer']['postgres']['database']
 | |
| 
 | |
| postgresql_user postgres_user do
 | |
|   action :create
 | |
|   password credentials['postgresql_password']
 | |
| end
 | |
| 
 | |
| postgresql_database postgres_db do
 | |
|   owner postgres_user
 | |
|   action :create
 | |
| end
 |