Update/fix hubot URL, move variables to attributes
This commit is contained in:
		
							parent
							
								
									042014b1cb
								
							
						
					
					
						commit
						fff5a044fe
					
				
							
								
								
									
										3
									
								
								site-cookbooks/kosmos-mediawiki/attributes/default.rb
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								site-cookbooks/kosmos-mediawiki/attributes/default.rb
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,3 @@ | |||||||
|  | node.default["mediawiki"]["url"] = "https://wiki.kosmos.org/" | ||||||
|  | node.default["mediawiki"]["hubot_base_url"] = "http://barnard.kosmos.org:8080" | ||||||
|  | node.default["mediawiki"]["hubot_room"] = "#kosmos" | ||||||
| @ -140,14 +140,14 @@ ark "MediawikiHubot" do | |||||||
|   action :cherry_pick |   action :cherry_pick | ||||||
| end | end | ||||||
| 
 | 
 | ||||||
| hal8000_freenode_data_bag_item = Chef::EncryptedDataBagItem.load('credentials', 'hal8000_freenode') | hubot_credentials = Chef::EncryptedDataBagItem.load('credentials', 'hal8000_freenode') | ||||||
| webhook_token = hal8000_freenode_data_bag_item['webhook_token'] | webhook_token = hubot_credentials['webhook_token'] | ||||||
| 
 | 
 | ||||||
| template "#{node['mediawiki']['webdir']}/extensions/MediawikiHubot/DefaultConfig.php" do | template "#{node['mediawiki']['webdir']}/extensions/MediawikiHubot/DefaultConfig.php" do | ||||||
|   source "MediawikiHubot/DefaultConfig.php.erb" |   source "MediawikiHubot/DefaultConfig.php.erb" | ||||||
|   variables webhook_url: "http://localhost:8080/incoming/#{webhook_token}", |   variables webhook_url: "#{node['mediawiki']['hubot_base_url']}/incoming/#{webhook_token}", | ||||||
|             room_name: "#kosmos", |             room_name: node['mediawiki']['hubot_room'], | ||||||
|             wiki_url: "https://wiki.kosmos.org/" |             wiki_url: node['mediawiki']['url'] | ||||||
| end | end | ||||||
| 
 | 
 | ||||||
| ruby_block "configuration" do | ruby_block "configuration" do | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user