Add timezone-ii cookbook to set timezone to UTC
This commit is contained in:
		
							parent
							
								
									5db8455da3
								
							
						
					
					
						commit
						b9e9a59d54
					
				
							
								
								
									
										1
									
								
								Batali
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								Batali
									
									
									
									
									
								
							| @ -24,6 +24,7 @@ Batali.define do | ||||
|   cookbook 'database' | ||||
|   cookbook 'mysql2_chef_gem' | ||||
|   cookbook 'omnibus_updater', '~> 1.0.4' | ||||
|   cookbook 'timezone-ii' | ||||
| end | ||||
| 
 | ||||
| # vim: set filetype=ruby | ||||
|  | ||||
							
								
								
									
										100
									
								
								batali.manifest
									
									
									
									
									
								
							
							
						
						
									
										100
									
								
								batali.manifest
									
									
									
									
									
								
							| @ -36,7 +36,7 @@ | ||||
|       "version": "3.1.0", | ||||
|       "source": { | ||||
|         "type": "Batali::Source::Site", | ||||
|         "url": "https://supermarket.chef.io/api/v1/cookbooks/apache2/versions/3.1.0/download", | ||||
|         "url": "https://supermarket.chef.io:443/api/v1/cookbooks/apache2/versions/3.1.0/download", | ||||
|         "version": "3.1.0" | ||||
|       } | ||||
|     }, | ||||
| @ -71,7 +71,7 @@ | ||||
|       "version": "1.5.0", | ||||
|       "source": { | ||||
|         "type": "Batali::Source::Site", | ||||
|         "url": "https://supermarket.chef.io/api/v1/cookbooks/php/versions/1.5.0/download", | ||||
|         "url": "https://supermarket.chef.io:443/api/v1/cookbooks/php/versions/1.5.0/download", | ||||
|         "version": "1.5.0" | ||||
|       } | ||||
|     }, | ||||
| @ -83,7 +83,7 @@ | ||||
|       "version": "2.2.3", | ||||
|       "source": { | ||||
|         "type": "Batali::Source::Site", | ||||
|         "url": "https://supermarket.chef.io/api/v1/cookbooks/build-essential/versions/2.2.3/download", | ||||
|         "url": "https://supermarket.chef.io:443/api/v1/cookbooks/build-essential/versions/2.2.3/download", | ||||
|         "version": "2.2.3" | ||||
|       } | ||||
|     }, | ||||
| @ -102,7 +102,7 @@ | ||||
|       "version": "1.2.13", | ||||
|       "source": { | ||||
|         "type": "Batali::Source::Site", | ||||
|         "url": "https://supermarket.chef.io/api/v1/cookbooks/xml/versions/1.2.13/download", | ||||
|         "url": "https://supermarket.chef.io:443/api/v1/cookbooks/xml/versions/1.2.13/download", | ||||
|         "version": "1.2.13" | ||||
|       } | ||||
|     }, | ||||
| @ -114,7 +114,7 @@ | ||||
|       "version": "3.1.0", | ||||
|       "source": { | ||||
|         "type": "Batali::Source::Site", | ||||
|         "url": "https://supermarket.chef.io/api/v1/cookbooks/chef-sugar/versions/3.1.0/download", | ||||
|         "url": "https://supermarket.chef.io:443/api/v1/cookbooks/chef-sugar/versions/3.1.0/download", | ||||
|         "version": "3.1.0" | ||||
|       } | ||||
|     }, | ||||
| @ -133,7 +133,7 @@ | ||||
|       "version": "6.0.22", | ||||
|       "source": { | ||||
|         "type": "Batali::Source::Site", | ||||
|         "url": "https://supermarket.chef.io/api/v1/cookbooks/mysql/versions/6.0.22/download", | ||||
|         "url": "https://supermarket.chef.io:443/api/v1/cookbooks/mysql/versions/6.0.22/download", | ||||
|         "version": "6.0.22" | ||||
|       } | ||||
|     }, | ||||
| @ -148,7 +148,7 @@ | ||||
|       "version": "0.1.17", | ||||
|       "source": { | ||||
|         "type": "Batali::Source::Site", | ||||
|         "url": "https://supermarket.chef.io/api/v1/cookbooks/yum-mysql-community/versions/0.1.17/download", | ||||
|         "url": "https://supermarket.chef.io:443/api/v1/cookbooks/yum-mysql-community/versions/0.1.17/download", | ||||
|         "version": "0.1.17" | ||||
|       } | ||||
|     }, | ||||
| @ -160,7 +160,7 @@ | ||||
|       "version": "3.6.1", | ||||
|       "source": { | ||||
|         "type": "Batali::Source::Site", | ||||
|         "url": "https://supermarket.chef.io/api/v1/cookbooks/yum/versions/3.6.1/download", | ||||
|         "url": "https://supermarket.chef.io:443/api/v1/cookbooks/yum/versions/3.6.1/download", | ||||
|         "version": "3.6.1" | ||||
|       } | ||||
|     }, | ||||
| @ -175,7 +175,7 @@ | ||||
|       "version": "2.2.7", | ||||
|       "source": { | ||||
|         "type": "Batali::Source::Site", | ||||
|         "url": "https://supermarket.chef.io/api/v1/cookbooks/smf/versions/2.2.7/download", | ||||
|         "url": "https://supermarket.chef.io:443/api/v1/cookbooks/smf/versions/2.2.7/download", | ||||
|         "version": "2.2.7" | ||||
|       } | ||||
|     }, | ||||
| @ -187,7 +187,7 @@ | ||||
|       "version": "1.0.3", | ||||
|       "source": { | ||||
|         "type": "Batali::Source::Site", | ||||
|         "url": "https://supermarket.chef.io/api/v1/cookbooks/rbac/versions/1.0.3/download", | ||||
|         "url": "https://supermarket.chef.io:443/api/v1/cookbooks/rbac/versions/1.0.3/download", | ||||
|         "version": "1.0.3" | ||||
|       } | ||||
|     }, | ||||
| @ -202,7 +202,7 @@ | ||||
|       "version": "0.6.0", | ||||
|       "source": { | ||||
|         "type": "Batali::Source::Site", | ||||
|         "url": "https://supermarket.chef.io/api/v1/cookbooks/yum-epel/versions/0.6.0/download", | ||||
|         "url": "https://supermarket.chef.io:443/api/v1/cookbooks/yum-epel/versions/0.6.0/download", | ||||
|         "version": "0.6.0" | ||||
|       } | ||||
|     }, | ||||
| @ -217,7 +217,7 @@ | ||||
|       "version": "1.36.6", | ||||
|       "source": { | ||||
|         "type": "Batali::Source::Site", | ||||
|         "url": "https://supermarket.chef.io/api/v1/cookbooks/windows/versions/1.36.6/download", | ||||
|         "url": "https://supermarket.chef.io:443/api/v1/cookbooks/windows/versions/1.36.6/download", | ||||
|         "version": "1.36.6" | ||||
|       } | ||||
|     }, | ||||
| @ -229,7 +229,7 @@ | ||||
|       "version": "1.1.9", | ||||
|       "source": { | ||||
|         "type": "Batali::Source::Site", | ||||
|         "url": "https://supermarket.chef.io/api/v1/cookbooks/chef_handler/versions/1.1.9/download", | ||||
|         "url": "https://supermarket.chef.io:443/api/v1/cookbooks/chef_handler/versions/1.1.9/download", | ||||
|         "version": "1.1.9" | ||||
|       } | ||||
|     }, | ||||
| @ -244,7 +244,7 @@ | ||||
|       "version": "4.1.1", | ||||
|       "source": { | ||||
|         "type": "Batali::Source::Site", | ||||
|         "url": "https://supermarket.chef.io/api/v1/cookbooks/iis/versions/4.1.1/download", | ||||
|         "url": "https://supermarket.chef.io:443/api/v1/cookbooks/iis/versions/4.1.1/download", | ||||
|         "version": "4.1.1" | ||||
|       } | ||||
|     }, | ||||
| @ -259,7 +259,7 @@ | ||||
|       "version": "4.0.6", | ||||
|       "source": { | ||||
|         "type": "Batali::Source::Site", | ||||
|         "url": "https://supermarket.chef.io/api/v1/cookbooks/database/versions/4.0.6/download", | ||||
|         "url": "https://supermarket.chef.io:443/api/v1/cookbooks/database/versions/4.0.6/download", | ||||
|         "version": "4.0.6" | ||||
|       } | ||||
|     }, | ||||
| @ -282,7 +282,7 @@ | ||||
|       "version": "3.4.20", | ||||
|       "source": { | ||||
|         "type": "Batali::Source::Site", | ||||
|         "url": "https://supermarket.chef.io/api/v1/cookbooks/postgresql/versions/3.4.20/download", | ||||
|         "url": "https://supermarket.chef.io:443/api/v1/cookbooks/postgresql/versions/3.4.20/download", | ||||
|         "version": "3.4.20" | ||||
|       } | ||||
|     }, | ||||
| @ -294,7 +294,7 @@ | ||||
|       "version": "2.7.0", | ||||
|       "source": { | ||||
|         "type": "Batali::Source::Site", | ||||
|         "url": "https://supermarket.chef.io/api/v1/cookbooks/apt/versions/2.7.0/download", | ||||
|         "url": "https://supermarket.chef.io:443/api/v1/cookbooks/apt/versions/2.7.0/download", | ||||
|         "version": "2.7.0" | ||||
|       } | ||||
|     }, | ||||
| @ -309,7 +309,7 @@ | ||||
|       "version": "4.0.0", | ||||
|       "source": { | ||||
|         "type": "Batali::Source::Site", | ||||
|         "url": "https://supermarket.chef.io/api/v1/cookbooks/openssl/versions/4.0.0/download", | ||||
|         "url": "https://supermarket.chef.io:443/api/v1/cookbooks/openssl/versions/4.0.0/download", | ||||
|         "version": "4.0.0" | ||||
|       } | ||||
|     }, | ||||
| @ -321,7 +321,7 @@ | ||||
|       "version": "3.6.2", | ||||
|       "source": { | ||||
|         "type": "Batali::Source::Site", | ||||
|         "url": "https://supermarket.chef.io/api/v1/cookbooks/postfix/versions/3.6.2/download", | ||||
|         "url": "https://supermarket.chef.io:443/api/v1/cookbooks/postfix/versions/3.6.2/download", | ||||
|         "version": "3.6.2" | ||||
|       } | ||||
|     }, | ||||
| @ -336,7 +336,7 @@ | ||||
|       "version": "0.1.2", | ||||
|       "source": { | ||||
|         "type": "Batali::Source::Site", | ||||
|         "url": "https://supermarket.chef.io/api/v1/cookbooks/unattended-upgrades/versions/0.1.2/download", | ||||
|         "url": "https://supermarket.chef.io:443/api/v1/cookbooks/unattended-upgrades/versions/0.1.2/download", | ||||
|         "version": "0.1.2" | ||||
|       } | ||||
|     }, | ||||
| @ -386,7 +386,7 @@ | ||||
|       "version": "2.4.0", | ||||
|       "source": { | ||||
|         "type": "Batali::Source::Site", | ||||
|         "url": "https://supermarket.chef.io/api/v1/cookbooks/nodejs/versions/2.4.0/download", | ||||
|         "url": "https://supermarket.chef.io:443/api/v1/cookbooks/nodejs/versions/2.4.0/download", | ||||
|         "version": "2.4.0" | ||||
|       } | ||||
|     }, | ||||
| @ -405,7 +405,7 @@ | ||||
|       "version": "0.9.0", | ||||
|       "source": { | ||||
|         "type": "Batali::Source::Site", | ||||
|         "url": "https://supermarket.chef.io/api/v1/cookbooks/ark/versions/0.9.0/download", | ||||
|         "url": "https://supermarket.chef.io:443/api/v1/cookbooks/ark/versions/0.9.0/download", | ||||
|         "version": "0.9.0" | ||||
|       } | ||||
|     }, | ||||
| @ -420,7 +420,7 @@ | ||||
|       "version": "1.0.2", | ||||
|       "source": { | ||||
|         "type": "Batali::Source::Site", | ||||
|         "url": "https://supermarket.chef.io/api/v1/cookbooks/7-zip/versions/1.0.2/download", | ||||
|         "url": "https://supermarket.chef.io:443/api/v1/cookbooks/7-zip/versions/1.0.2/download", | ||||
|         "version": "1.0.2" | ||||
|       } | ||||
|     }, | ||||
| @ -435,7 +435,7 @@ | ||||
|       "version": "1.12.0", | ||||
|       "source": { | ||||
|         "type": "Batali::Source::Site", | ||||
|         "url": "https://supermarket.chef.io/api/v1/cookbooks/homebrew/versions/1.12.0/download", | ||||
|         "url": "https://supermarket.chef.io:443/api/v1/cookbooks/homebrew/versions/1.12.0/download", | ||||
|         "version": "1.12.0" | ||||
|       } | ||||
|     }, | ||||
| @ -447,7 +447,7 @@ | ||||
|       "version": "4.1.6", | ||||
|       "source": { | ||||
|         "type": "Batali::Source::Site", | ||||
|         "url": "https://supermarket.chef.io/api/v1/cookbooks/application/versions/4.1.6/download", | ||||
|         "url": "https://supermarket.chef.io:443/api/v1/cookbooks/application/versions/4.1.6/download", | ||||
|         "version": "4.1.6" | ||||
|       } | ||||
|     }, | ||||
| @ -459,7 +459,7 @@ | ||||
|       "version": "1.8.2", | ||||
|       "source": { | ||||
|         "type": "Batali::Source::Site", | ||||
|         "url": "https://supermarket.chef.io/api/v1/cookbooks/users/versions/1.8.2/download", | ||||
|         "url": "https://supermarket.chef.io:443/api/v1/cookbooks/users/versions/1.8.2/download", | ||||
|         "version": "1.8.2" | ||||
|       } | ||||
|     }, | ||||
| @ -471,7 +471,7 @@ | ||||
|       "version": "0.5.1", | ||||
|       "source": { | ||||
|         "type": "Batali::Source::Site", | ||||
|         "url": "https://supermarket.chef.io/api/v1/cookbooks/chef-solo-search/versions/0.5.1/download", | ||||
|         "url": "https://supermarket.chef.io:443/api/v1/cookbooks/chef-solo-search/versions/0.5.1/download", | ||||
|         "version": "0.5.1" | ||||
|       } | ||||
|     }, | ||||
| @ -483,7 +483,7 @@ | ||||
|       "version": "2.7.1", | ||||
|       "source": { | ||||
|         "type": "Batali::Source::Site", | ||||
|         "url": "https://supermarket.chef.io/api/v1/cookbooks/sudo/versions/2.7.1/download", | ||||
|         "url": "https://supermarket.chef.io:443/api/v1/cookbooks/sudo/versions/2.7.1/download", | ||||
|         "version": "2.7.1" | ||||
|       } | ||||
|     }, | ||||
| @ -498,7 +498,7 @@ | ||||
|       "version": "0.3.0", | ||||
|       "source": { | ||||
|         "type": "Batali::Source::Site", | ||||
|         "url": "https://supermarket.chef.io/api/v1/cookbooks/hostname/versions/0.3.0/download", | ||||
|         "url": "https://supermarket.chef.io:443/api/v1/cookbooks/hostname/versions/0.3.0/download", | ||||
|         "version": "0.3.0" | ||||
|       } | ||||
|     }, | ||||
| @ -510,7 +510,7 @@ | ||||
|       "version": "2.4.5", | ||||
|       "source": { | ||||
|         "type": "Batali::Source::Site", | ||||
|         "url": "https://supermarket.chef.io/api/v1/cookbooks/hostsfile/versions/2.4.5/download", | ||||
|         "url": "https://supermarket.chef.io:443/api/v1/cookbooks/hostsfile/versions/2.4.5/download", | ||||
|         "version": "2.4.5" | ||||
|       } | ||||
|     }, | ||||
| @ -540,7 +540,7 @@ | ||||
|       "version": "0.7.4", | ||||
|       "source": { | ||||
|         "type": "Batali::Source::Site", | ||||
|         "url": "https://supermarket.chef.io/api/v1/cookbooks/ufw/versions/0.7.4/download", | ||||
|         "url": "https://supermarket.chef.io:443/api/v1/cookbooks/ufw/versions/0.7.4/download", | ||||
|         "version": "0.7.4" | ||||
|       } | ||||
|     }, | ||||
| @ -555,7 +555,7 @@ | ||||
|       "version": "1.2.0", | ||||
|       "source": { | ||||
|         "type": "Batali::Source::Site", | ||||
|         "url": "https://supermarket.chef.io/api/v1/cookbooks/firewall/versions/1.2.0/download", | ||||
|         "url": "https://supermarket.chef.io:443/api/v1/cookbooks/firewall/versions/1.2.0/download", | ||||
|         "version": "1.2.0" | ||||
|       } | ||||
|     }, | ||||
| @ -567,7 +567,7 @@ | ||||
|       "version": "2.0.1", | ||||
|       "source": { | ||||
|         "type": "Batali::Source::Site", | ||||
|         "url": "https://supermarket.chef.io/api/v1/cookbooks/poise/versions/2.0.1/download", | ||||
|         "url": "https://supermarket.chef.io:443/api/v1/cookbooks/poise/versions/2.0.1/download", | ||||
|         "version": "2.0.1" | ||||
|       } | ||||
|     }, | ||||
| @ -582,7 +582,7 @@ | ||||
|       "version": "2.0.0", | ||||
|       "source": { | ||||
|         "type": "Batali::Source::Site", | ||||
|         "url": "https://supermarket.chef.io/api/v1/cookbooks/ssh_known_hosts/versions/2.0.0/download", | ||||
|         "url": "https://supermarket.chef.io:443/api/v1/cookbooks/ssh_known_hosts/versions/2.0.0/download", | ||||
|         "version": "2.0.0" | ||||
|       } | ||||
|     }, | ||||
| @ -594,7 +594,7 @@ | ||||
|       "version": "1.0.8", | ||||
|       "source": { | ||||
|         "type": "Batali::Source::Site", | ||||
|         "url": "https://supermarket.chef.io/api/v1/cookbooks/partial_search/versions/1.0.8/download", | ||||
|         "url": "https://supermarket.chef.io:443/api/v1/cookbooks/partial_search/versions/1.0.8/download", | ||||
|         "version": "1.0.8" | ||||
|       } | ||||
|     }, | ||||
| @ -629,7 +629,7 @@ | ||||
|       "version": "2.7.6", | ||||
|       "source": { | ||||
|         "type": "Batali::Source::Site", | ||||
|         "url": "https://supermarket.chef.io/api/v1/cookbooks/nginx/versions/2.7.6/download", | ||||
|         "url": "https://supermarket.chef.io:443/api/v1/cookbooks/nginx/versions/2.7.6/download", | ||||
|         "version": "2.7.6" | ||||
|       } | ||||
|     }, | ||||
| @ -644,7 +644,7 @@ | ||||
|       "version": "2.3.1", | ||||
|       "source": { | ||||
|         "type": "Batali::Source::Site", | ||||
|         "url": "https://supermarket.chef.io/api/v1/cookbooks/bluepill/versions/2.3.1/download", | ||||
|         "url": "https://supermarket.chef.io:443/api/v1/cookbooks/bluepill/versions/2.3.1/download", | ||||
|         "version": "2.3.1" | ||||
|       } | ||||
|     }, | ||||
| @ -656,7 +656,7 @@ | ||||
|       "version": "2.0.0", | ||||
|       "source": { | ||||
|         "type": "Batali::Source::Site", | ||||
|         "url": "https://supermarket.chef.io/api/v1/cookbooks/rsyslog/versions/2.0.0/download", | ||||
|         "url": "https://supermarket.chef.io:443/api/v1/cookbooks/rsyslog/versions/2.0.0/download", | ||||
|         "version": "2.0.0" | ||||
|       } | ||||
|     }, | ||||
| @ -668,7 +668,7 @@ | ||||
|       "version": "2.0.1", | ||||
|       "source": { | ||||
|         "type": "Batali::Source::Site", | ||||
|         "url": "https://supermarket.chef.io/api/v1/cookbooks/ohai/versions/2.0.1/download", | ||||
|         "url": "https://supermarket.chef.io:443/api/v1/cookbooks/ohai/versions/2.0.1/download", | ||||
|         "version": "2.0.1" | ||||
|       } | ||||
|     }, | ||||
| @ -683,7 +683,7 @@ | ||||
|       "version": "1.6.0", | ||||
|       "source": { | ||||
|         "type": "Batali::Source::Site", | ||||
|         "url": "https://supermarket.chef.io/api/v1/cookbooks/runit/versions/1.6.0/download", | ||||
|         "url": "https://supermarket.chef.io:443/api/v1/cookbooks/runit/versions/1.6.0/download", | ||||
|         "version": "1.6.0" | ||||
|       } | ||||
|     }, | ||||
| @ -695,7 +695,7 @@ | ||||
|       "version": "0.0.18", | ||||
|       "source": { | ||||
|         "type": "Batali::Source::Site", | ||||
|         "url": "https://supermarket.chef.io/api/v1/cookbooks/packagecloud/versions/0.0.18/download", | ||||
|         "url": "https://supermarket.chef.io:443/api/v1/cookbooks/packagecloud/versions/0.0.18/download", | ||||
|         "version": "0.0.18" | ||||
|       } | ||||
|     }, | ||||
| @ -718,7 +718,7 @@ | ||||
|       "version": "1.0.1", | ||||
|       "source": { | ||||
|         "type": "Batali::Source::Site", | ||||
|         "url": "https://supermarket.chef.io/api/v1/cookbooks/mysql2_chef_gem/versions/1.0.1/download", | ||||
|         "url": "https://supermarket.chef.io:443/api/v1/cookbooks/mysql2_chef_gem/versions/1.0.1/download", | ||||
|         "version": "1.0.1" | ||||
|       } | ||||
|     }, | ||||
| @ -741,7 +741,7 @@ | ||||
|       "version": "0.3.0", | ||||
|       "source": { | ||||
|         "type": "Batali::Source::Site", | ||||
|         "url": "https://supermarket.chef.io/api/v1/cookbooks/mariadb/versions/0.3.0/download", | ||||
|         "url": "https://supermarket.chef.io:443/api/v1/cookbooks/mariadb/versions/0.3.0/download", | ||||
|         "version": "0.3.0" | ||||
|       } | ||||
|     }, | ||||
| @ -753,9 +753,21 @@ | ||||
|       "version": "1.0.4", | ||||
|       "source": { | ||||
|         "type": "Batali::Source::Site", | ||||
|         "url": "https://supermarket.chef.io/api/v1/cookbooks/omnibus_updater/versions/1.0.4/download", | ||||
|         "url": "https://supermarket.chef.io:443/api/v1/cookbooks/omnibus_updater/versions/1.0.4/download", | ||||
|         "version": "1.0.4" | ||||
|       } | ||||
|     }, | ||||
|     { | ||||
|       "name": "timezone-ii", | ||||
|       "dependencies": [ | ||||
| 
 | ||||
|       ], | ||||
|       "version": "0.2.0", | ||||
|       "source": { | ||||
|         "type": "Batali::Source::Site", | ||||
|         "url": "https://supermarket.chef.io:443/api/v1/cookbooks/timezone-ii/versions/0.2.0/download", | ||||
|         "version": "0.2.0" | ||||
|       } | ||||
|     } | ||||
|   ] | ||||
| } | ||||
							
								
								
									
										4
									
								
								cookbooks/timezone-ii/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								cookbooks/timezone-ii/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,4 @@ | ||||
| .bundle | ||||
| .cache | ||||
| .kitchen | ||||
| bin | ||||
							
								
								
									
										50
									
								
								cookbooks/timezone-ii/.rvmrc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										50
									
								
								cookbooks/timezone-ii/.rvmrc
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,50 @@ | ||||
| #!/usr/bin/env bash | ||||
| 
 | ||||
| # This is an RVM Project .rvmrc file, used to automatically load the ruby | ||||
| # development environment upon cd'ing into the directory | ||||
| 
 | ||||
| # First we specify our desired <ruby>[@<gemset>], the @gemset name is optional, | ||||
| # Only full ruby name is supported here, for short names use: | ||||
| #     echo "rvm use 1.9.3" > .rvmrc | ||||
| environment_id="ruby-1.9.3-p385@chefdev" | ||||
| 
 | ||||
| # Uncomment the following lines if you want to verify rvm version per project | ||||
| # rvmrc_rvm_version="1.18.3 (stable)" # 1.10.1 seams as a safe start | ||||
| # eval "$(echo ${rvm_version}.${rvmrc_rvm_version} | awk -F. '{print "[[ "$1*65536+$2*256+$3" -ge "$4*65536+$5*256+$6" ]]"}' )" || { | ||||
| #   echo "This .rvmrc file requires at least RVM ${rvmrc_rvm_version}, aborting loading." | ||||
| #   return 1 | ||||
| # } | ||||
| 
 | ||||
| # First we attempt to load the desired environment directly from the environment | ||||
| # file. This is very fast and efficient compared to running through the entire | ||||
| # CLI and selector. If you want feedback on which environment was used then | ||||
| # insert the word 'use' after --create as this triggers verbose mode. | ||||
| if [[ -d "${rvm_path:-$HOME/.rvm}/environments" | ||||
|   && -s "${rvm_path:-$HOME/.rvm}/environments/$environment_id" ]] | ||||
| then | ||||
|   \. "${rvm_path:-$HOME/.rvm}/environments/$environment_id" | ||||
|   [[ -s "${rvm_path:-$HOME/.rvm}/hooks/after_use" ]] && | ||||
|     \. "${rvm_path:-$HOME/.rvm}/hooks/after_use" || true | ||||
| else | ||||
|   # If the environment file has not yet been created, use the RVM CLI to select. | ||||
|   rvm --create  "$environment_id" || { | ||||
|     echo "Failed to create RVM environment '${environment_id}'." | ||||
|     return 1 | ||||
|   } | ||||
| fi | ||||
| 
 | ||||
| # If you use bundler, this might be useful to you: | ||||
| if [[ -s Gemfile ]] && { | ||||
|   ! builtin command -v bundle >/dev/null || | ||||
|   builtin command -v bundle | GREP_OPTIONS= \grep $rvm_path/bin/bundle >/dev/null | ||||
| } | ||||
| then | ||||
|   printf "%b" "The rubygem 'bundler' is not installed. Installing it now.\n" | ||||
|   gem install bundler | ||||
| fi | ||||
| if [[ -s Gemfile ]] && builtin command -v bundle >/dev/null | ||||
| then | ||||
|   bundle install | GREP_OPTIONS= \grep -vE '^Using|Your bundle is complete' | ||||
| fi | ||||
| 
 | ||||
| echo -n ".rvmrc: switched Ruby to "; rvm current | ||||
							
								
								
									
										13
									
								
								cookbooks/timezone-ii/CHANGELOG.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								cookbooks/timezone-ii/CHANGELOG.md
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,13 @@ | ||||
| # CHANGELOG for timezone-ii | ||||
| 
 | ||||
| This file is used to list changes made in each version of timezone-ii. | ||||
| 
 | ||||
| ## 0.2.0: | ||||
| 
 | ||||
| * Initial release of timezone-ii (as forked from timezone) | ||||
| * Added support for Fedora | ||||
| * Configurable paths for localtime data and tzdata tree (just in case someone | ||||
|   wants them...) | ||||
| * For generic Linux timezone setting, a choice of copying or symlinking timezone | ||||
|   data to localtime (copying is the default, to avoid surprises) | ||||
| 
 | ||||
							
								
								
									
										6
									
								
								cookbooks/timezone-ii/Gemfile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								cookbooks/timezone-ii/Gemfile
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,6 @@ | ||||
| source "http://rubygems.org/" | ||||
| 
 | ||||
| group :development, :test do | ||||
|     gem "chef" | ||||
|     gem "test-kitchen" | ||||
| end | ||||
							
								
								
									
										133
									
								
								cookbooks/timezone-ii/Gemfile.lock
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										133
									
								
								cookbooks/timezone-ii/Gemfile.lock
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,133 @@ | ||||
| GEM | ||||
|   remote: http://rubygems.org/ | ||||
|   specs: | ||||
|     archive-tar-minitar (0.5.2) | ||||
|     builder (3.1.4) | ||||
|     bunny (0.7.9) | ||||
|     chef (10.18.2) | ||||
|       bunny (>= 0.6.0, < 0.8.0) | ||||
|       erubis | ||||
|       highline (>= 1.6.9) | ||||
|       json (>= 1.4.4, <= 1.6.1) | ||||
|       mixlib-authentication (>= 1.3.0) | ||||
|       mixlib-cli (>= 1.1.0) | ||||
|       mixlib-config (>= 1.1.2) | ||||
|       mixlib-log (>= 1.3.0) | ||||
|       mixlib-shellout | ||||
|       moneta (< 0.7.0) | ||||
|       net-ssh (~> 2.2.2) | ||||
|       net-ssh-multi (~> 1.1.0) | ||||
|       ohai (>= 0.6.0) | ||||
|       rest-client (>= 1.0.4, < 1.7.0) | ||||
|       treetop (~> 1.4.9) | ||||
|       uuidtools | ||||
|       yajl-ruby (~> 1.1) | ||||
|     childprocess (0.3.7) | ||||
|       ffi (~> 1.0, >= 1.0.6) | ||||
|     coderay (1.0.8) | ||||
|     erubis (2.7.0) | ||||
|     excon (0.16.10) | ||||
|     ffi (1.3.1) | ||||
|     fog (1.9.0) | ||||
|       builder | ||||
|       excon (~> 0.14) | ||||
|       formatador (~> 0.2.0) | ||||
|       mime-types | ||||
|       multi_json (~> 1.0) | ||||
|       net-scp (~> 1.0.4) | ||||
|       net-ssh (>= 2.1.3) | ||||
|       nokogiri (~> 1.5.0) | ||||
|       ruby-hmac | ||||
|     foodcritic (1.7.0) | ||||
|       erubis | ||||
|       gherkin (~> 2.11.1) | ||||
|       gist (~> 3.1.0) | ||||
|       nokogiri (~> 1.5.4) | ||||
|       pry (~> 0.9.8.4) | ||||
|       rak (~> 1.4) | ||||
|       treetop (~> 1.4.10) | ||||
|       yajl-ruby (~> 1.1.0) | ||||
|     formatador (0.2.4) | ||||
|     gherkin (2.11.5) | ||||
|       json (>= 1.4.6) | ||||
|     gist (3.1.1) | ||||
|     hashr (0.0.22) | ||||
|     highline (1.6.15) | ||||
|     i18n (0.6.1) | ||||
|     ipaddress (0.8.0) | ||||
|     json (1.5.4) | ||||
|     librarian (0.0.26) | ||||
|       archive-tar-minitar (>= 0.5.2) | ||||
|       chef (>= 0.10) | ||||
|       highline | ||||
|       thor (~> 0.15) | ||||
|     log4r (1.1.10) | ||||
|     method_source (0.7.1) | ||||
|     mime-types (1.20.1) | ||||
|     mixlib-authentication (1.3.0) | ||||
|       mixlib-log | ||||
|     mixlib-cli (1.2.2) | ||||
|     mixlib-config (1.1.2) | ||||
|     mixlib-log (1.4.1) | ||||
|     mixlib-shellout (1.1.0) | ||||
|     moneta (0.6.0) | ||||
|     multi_json (1.5.0) | ||||
|     net-scp (1.0.4) | ||||
|       net-ssh (>= 1.99.1) | ||||
|     net-ssh (2.2.2) | ||||
|     net-ssh-gateway (1.1.0) | ||||
|       net-ssh (>= 1.99.1) | ||||
|     net-ssh-multi (1.1) | ||||
|       net-ssh (>= 2.1.4) | ||||
|       net-ssh-gateway (>= 0.99.0) | ||||
|     nokogiri (1.5.6) | ||||
|     ohai (6.16.0) | ||||
|       ipaddress | ||||
|       mixlib-cli | ||||
|       mixlib-config | ||||
|       mixlib-log | ||||
|       mixlib-shellout | ||||
|       systemu | ||||
|       yajl-ruby | ||||
|     polyglot (0.3.3) | ||||
|     pry (0.9.8.4) | ||||
|       coderay (~> 1.0.5) | ||||
|       method_source (~> 0.7.1) | ||||
|       slop (>= 2.4.4, < 3) | ||||
|     rak (1.4) | ||||
|     rest-client (1.6.7) | ||||
|       mime-types (>= 1.16) | ||||
|     ruby-hmac (0.4.0) | ||||
|     slop (2.4.4) | ||||
|     systemu (2.5.2) | ||||
|     test-kitchen (0.7.0) | ||||
|       fog | ||||
|       foodcritic (>= 1.4.0) | ||||
|       hashr (~> 0.0.20) | ||||
|       highline (>= 1.6.9) | ||||
|       librarian (~> 0.0.20) | ||||
|       mixlib-cli (~> 1.2.2) | ||||
|       vagrant (~> 1.0.2) | ||||
|       yajl-ruby (~> 1.1.0) | ||||
|     thor (0.17.0) | ||||
|     treetop (1.4.12) | ||||
|       polyglot | ||||
|       polyglot (>= 0.3.1) | ||||
|     uuidtools (2.1.3) | ||||
|     vagrant (1.0.6) | ||||
|       archive-tar-minitar (= 0.5.2) | ||||
|       childprocess (~> 0.3.1) | ||||
|       erubis (~> 2.7.0) | ||||
|       i18n (~> 0.6.0) | ||||
|       json (~> 1.5.1) | ||||
|       log4r (~> 1.1.9) | ||||
|       net-scp (~> 1.0.4) | ||||
|       net-ssh (~> 2.2.2) | ||||
|     yajl-ruby (1.1.0) | ||||
| 
 | ||||
| PLATFORMS | ||||
|   ruby | ||||
| 
 | ||||
| DEPENDENCIES | ||||
|   chef | ||||
|   test-kitchen | ||||
							
								
								
									
										116
									
								
								cookbooks/timezone-ii/README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										116
									
								
								cookbooks/timezone-ii/README.md
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,116 @@ | ||||
| Timezone II | ||||
| =========== | ||||
| 
 | ||||
| The Timezone II cookbook contains recipes for installing the latest tzdata | ||||
| (a.k.a. IANA or Olson) timezone database and setting the timezone on your | ||||
| system.  It is a fork of the [timezone cookbook by James | ||||
| Harton.](http://community.opscode.com/cookbooks/timezone) | ||||
| 
 | ||||
| Requirements | ||||
| ------------ | ||||
| 
 | ||||
| This cookbook is known to work with: | ||||
| 
 | ||||
| * Amazon Linux | ||||
| * CentOS | ||||
| * Debian | ||||
| * Fedora | ||||
| * Gentoo | ||||
| * Ubuntu | ||||
| 
 | ||||
| It _should_ work with any OS that uses the IANA/Olson timezone database and | ||||
| stores local timezone data in /etc/localtime (the only OS I know of that does | ||||
| _not_ do this is MS Windows).  However, some OSs not mentioned above have their | ||||
| own system utility for setting the timezone, and this may overwrite the changes | ||||
| made by this cookbook. | ||||
| 
 | ||||
| Attributes | ||||
| ---------- | ||||
| 
 | ||||
| <table> | ||||
|   <tr> | ||||
|     <th>Key</th> | ||||
|     <th>Type</th> | ||||
|     <th>Description</th> | ||||
|     <th>Default</th> | ||||
|   </tr> | ||||
|   <tr> | ||||
|     <td><tt>['tz']</tt></td> | ||||
|     <td>String</td> | ||||
|     <td>the timezone name as defined in tzdata</td> | ||||
|     <td>UTC</td> | ||||
|   </tr> | ||||
|   <tr> | ||||
|     <td><tt>['timezone']['tzdata_dir']</tt></td> | ||||
|     <td>String</td> | ||||
|     <td>the path to the root of the tzdata files; the default value is for | ||||
|     most known distributions of Linux</td> | ||||
|     <td>/usr/share/zoneinfo</td> | ||||
|   </tr> | ||||
|   <tr> | ||||
|     <td><tt>['timezone']['localtime_path']</tt></td> | ||||
|     <td>String</td> | ||||
|     <td>the path to the file used by the kernel to read the local timezone's | ||||
|     settings; the default works for Linux and other *ix variants</td> | ||||
|     <td>/etc/localtime</td> | ||||
|   </tr> | ||||
|   <tr> | ||||
|     <td><tt>['timezone']['use_symlink']</tt></td> | ||||
|     <td>Boolean</td> | ||||
|     <td>whether to use a symlink into the tzdata tree rather than make a copy | ||||
|     of the appropriate timezone data file (linux-generic recipe only)</td> | ||||
|     <td>false</td> | ||||
|   </tr> | ||||
| </table> | ||||
| 
 | ||||
| Usage | ||||
| ----- | ||||
| 
 | ||||
| Set the "tz" attribute to your desired timezone and include the "timezone-ii" | ||||
| recipe in your node's run list: | ||||
| 
 | ||||
| ```json | ||||
| { | ||||
|   "name": "my_node", | ||||
|   "tz": "Africa/Timbuktu", | ||||
|   "run_list": [ | ||||
|     "recipe[timezone-ii]" | ||||
|   ] | ||||
| } | ||||
| ``` | ||||
| 
 | ||||
| The `timezone-ii::default` recipe will first install or upgrade the IANA/Olson | ||||
| timezone database package for your OS (`timezone-data` on Gentoo, `tzdata` on | ||||
| all others). Then it will call one of the following recipes according to your | ||||
| node's platform: | ||||
| 
 | ||||
| * `timezone-ii::debian` | ||||
| * `timezone-ii::fedora` | ||||
| * `timezone-ii::linux-generic` | ||||
| 
 | ||||
| Contributing | ||||
| ------------ | ||||
| 1. Fork the [repository on GitHub](https://github.com/L2G/timezone-ii) | ||||
| 2. Create a named feature branch (like `add_component_x`) | ||||
| 3. Write your change | ||||
| 4. If at all possible, write test-kitchen tests for your change and ensure they | ||||
|    all pass | ||||
| 5. Submit a pull request using GitHub | ||||
| 
 | ||||
| License and Authors | ||||
| ------------------- | ||||
| 
 | ||||
| Copyright © 2010 James Harton <james@sociable.co.nz> | ||||
| 
 | ||||
| Copyright © 2013 Lawrence Leonard Gilbert <larry@L2G.to> | ||||
| 
 | ||||
| Licensed under the Apache License, Version 2.0 (the "License"); you may not use | ||||
| this file except in compliance with the License.  You may obtain a copy of the | ||||
| License at | ||||
| 
 | ||||
|      http://www.apache.org/licenses/LICENSE-2.0 | ||||
| 
 | ||||
| Unless required by applicable law or agreed to in writing, software distributed | ||||
| under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR | ||||
| CONDITIONS OF ANY KIND, either express or implied.  See the License for the | ||||
| specific language governing permissions and limitations under the License. | ||||
							
								
								
									
										11
									
								
								cookbooks/timezone-ii/attributes/default.rb
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								cookbooks/timezone-ii/attributes/default.rb
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,11 @@ | ||||
| default.tz = 'UTC' | ||||
| 
 | ||||
| # Path to tzdata directory | ||||
| default.timezone.tzdata_dir = '/usr/share/zoneinfo' | ||||
| 
 | ||||
| # Path to file used by kernel for local timezone's data | ||||
| default.timezone.localtime_path = '/etc/localtime' | ||||
| 
 | ||||
| # Whether to use a symlink to tzdata (instead of copying). | ||||
| # Used only in the linux-default recipe. | ||||
| default.timezone.use_symlink = false | ||||
| @ -0,0 +1,20 @@ | ||||
| require 'minitest/spec' | ||||
| 
 | ||||
| class TimezoneIiSpec < MiniTest::Chef::Spec | ||||
| 
 | ||||
|     describe_recipe 'timezone-ii::default' do | ||||
|         localtime_path = '/etc/localtime' | ||||
|         #original_tz_data_path = "/usr/share/zoneinfo/#{node[:tz]}" | ||||
|         original_tz_data_path = "/usr/share/zoneinfo/Africa/Timbuktu" | ||||
| 
 | ||||
|         describe localtime_path do | ||||
|             it "has the same data as #{original_tz_data_path}" do | ||||
|                 localtime_data = File.read(localtime_path) | ||||
|                 original_data =  File.read(original_tz_data_path) | ||||
|                 localtime_data.must_equal original_data | ||||
|             end | ||||
|         end | ||||
| 
 | ||||
|     end | ||||
| 
 | ||||
| end | ||||
							
								
								
									
										36
									
								
								cookbooks/timezone-ii/metadata.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								cookbooks/timezone-ii/metadata.json
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,36 @@ | ||||
| { | ||||
|   "name": "timezone-ii", | ||||
|   "description": "Configure the system timezone on Linux systems", | ||||
|   "long_description": "", | ||||
|   "maintainer": "Lawrence Leonard Gilbert", | ||||
|   "maintainer_email": "larry@L2G.to", | ||||
|   "license": "Apache 2.0", | ||||
|   "platforms": { | ||||
|     "amazon": ">= 0.0.0", | ||||
|     "centos": ">= 0.0.0", | ||||
|     "debian": ">= 0.0.0", | ||||
|     "fedora": ">= 0.0.0", | ||||
|     "gentoo": ">= 0.0.0", | ||||
|     "ubuntu": ">= 0.0.0" | ||||
|   }, | ||||
|   "dependencies": { | ||||
|   }, | ||||
|   "recommendations": { | ||||
|   }, | ||||
|   "suggestions": { | ||||
|   }, | ||||
|   "conflicting": { | ||||
|   }, | ||||
|   "providing": { | ||||
|   }, | ||||
|   "replacing": { | ||||
|     "timezone": ">= 0.0.0" | ||||
|   }, | ||||
|   "attributes": { | ||||
|   }, | ||||
|   "groupings": { | ||||
|   }, | ||||
|   "recipes": { | ||||
|   }, | ||||
|   "version": "0.2.0" | ||||
| } | ||||
							
								
								
									
										17
									
								
								cookbooks/timezone-ii/metadata.rb
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								cookbooks/timezone-ii/metadata.rb
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,17 @@ | ||||
| name             "timezone-ii" | ||||
| maintainer       "Lawrence Leonard Gilbert" | ||||
| maintainer_email "larry@L2G.to" | ||||
| license          "Apache 2.0" | ||||
| description      "Configure the system timezone on Linux systems" | ||||
| version          "0.2.0" | ||||
| 
 | ||||
| replaces         "timezone" | ||||
| 
 | ||||
| # These are platform versions where this cookbook has been tested at some point | ||||
| # in time | ||||
| supports "amazon" | ||||
| supports "centos" | ||||
| supports "debian" | ||||
| supports "fedora" | ||||
| supports "gentoo" | ||||
| supports "ubuntu" | ||||
							
								
								
									
										28
									
								
								cookbooks/timezone-ii/recipes/debian.rb
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								cookbooks/timezone-ii/recipes/debian.rb
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,28 @@ | ||||
| # | ||||
| # Cookbook Name:: timezone-ii | ||||
| # Recipe:: debian | ||||
| # | ||||
| # Copyright 2010, James Harton <james@sociable.co.nz> | ||||
| # Copyright 2013, Lawrence Leonard Gilbert <larry@L2G.to> | ||||
| # | ||||
| # Apache 2.0 License. | ||||
| # | ||||
| 
 | ||||
| # Set timezone for Debian family:  Put the timezone string in plain text in | ||||
| # /etc/timezone and then re-run the tzdata configuration to pick it up. | ||||
| 
 | ||||
| template "/etc/timezone" do | ||||
|   source "timezone.conf.erb" | ||||
|   owner 'root' | ||||
|   group 'root' | ||||
|   mode 0644 | ||||
|   notifies :run, 'bash[dpkg-reconfigure tzdata]' | ||||
| end | ||||
| 
 | ||||
| bash 'dpkg-reconfigure tzdata' do | ||||
|   user 'root' | ||||
|   code "/usr/sbin/dpkg-reconfigure -f noninteractive tzdata" | ||||
|   action :nothing | ||||
| end | ||||
| 
 | ||||
| # vim:ts=2:sw=2: | ||||
							
								
								
									
										47
									
								
								cookbooks/timezone-ii/recipes/default.rb
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										47
									
								
								cookbooks/timezone-ii/recipes/default.rb
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,47 @@ | ||||
| # | ||||
| # Cookbook Name:: timezone-ii | ||||
| # Recipe:: default | ||||
| # | ||||
| # Copyright 2010, James Harton <james@sociable.co.nz> | ||||
| # Copyright 2013, Lawrence Leonard Gilbert <larry@L2G.to> | ||||
| # | ||||
| # Apache 2.0 License. | ||||
| # | ||||
| 
 | ||||
| # Make sure the tzdata database is installed. (Arthur David Olson, the computer | ||||
| # timekeeping field is forever in your debt.) | ||||
| package value_for_platform_family( | ||||
|   'gentoo'  => 'timezone-data', | ||||
|   'default' => 'tzdata' | ||||
| ) | ||||
| 
 | ||||
| case node.platform_family | ||||
| when 'debian', 'fedora' | ||||
|   include_recipe "timezone-ii::#{node.platform_family}" | ||||
| 
 | ||||
| else | ||||
|   if node.os == "linux" | ||||
|     # Load the generic Linux recipe if there's no better known way to change the | ||||
|     # timezone.  Log a warning (unless this is known to be the best way on a | ||||
|     # particular platform). | ||||
|     message = "Linux platform '#{node.platform}' is unknown to this recipe; " + | ||||
|               "using generic Linux method" | ||||
|     log message do | ||||
|       level :warn | ||||
|       not_if { %w( centos gentoo rhel ).include? node.platform_family } | ||||
|     end | ||||
| 
 | ||||
|     include_recipe 'timezone-ii::linux-generic' | ||||
| 
 | ||||
|   else | ||||
|     message = "Don't know how to configure timezone for " + | ||||
|               "'#{node.platform_family}'!" | ||||
|     log message do | ||||
|       level :error | ||||
|     end | ||||
| 
 | ||||
|   end  # if/else node.os | ||||
| 
 | ||||
| end  # case node.platform_family | ||||
| 
 | ||||
| # vim:ts=2:sw=2: | ||||
							
								
								
									
										17
									
								
								cookbooks/timezone-ii/recipes/fedora.rb
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								cookbooks/timezone-ii/recipes/fedora.rb
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,17 @@ | ||||
| # | ||||
| # Cookbook Name:: timezone-ii | ||||
| # Recipe:: fedora | ||||
| # | ||||
| # Copyright 2013, Lawrence Leonard Gilbert <larry@L2G.to> | ||||
| # | ||||
| # Apache 2.0 License. | ||||
| # | ||||
| 
 | ||||
| # Set timezone for Fedora by using its timedatectl utility. | ||||
| 
 | ||||
| bash 'timedatectl set-timezone' do | ||||
|   user 'root' | ||||
|   code "/usr/bin/timedatectl --no-ask-password set-timezone #{node.tz}" | ||||
| end | ||||
| 
 | ||||
| # vim:ts=2:sw=2: | ||||
							
								
								
									
										46
									
								
								cookbooks/timezone-ii/recipes/linux-generic.rb
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										46
									
								
								cookbooks/timezone-ii/recipes/linux-generic.rb
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,46 @@ | ||||
| # | ||||
| # Cookbook Name:: timezone-ii | ||||
| # Recipe:: linux-generic | ||||
| # | ||||
| # Copyright 2013, Lawrence Leonard Gilbert <larry@L2G.to> | ||||
| # | ||||
| # Apache 2.0 License. | ||||
| # | ||||
| 
 | ||||
| # Generic timezone-changing method for Linux that should work for any distro | ||||
| # without a platform-specific method. | ||||
| 
 | ||||
| timezone_data_file = File.join(node.timezone.tzdata_dir, node.tz) | ||||
| localtime_path = node.timezone.localtime_path | ||||
| 
 | ||||
| ruby_block "confirm timezone" do | ||||
|   block { | ||||
|     unless File.exist?(timezone_data_file) | ||||
|       raise "Can't find #{timezone_data_file}!" | ||||
|     end | ||||
|   } | ||||
| end | ||||
| 
 | ||||
| if node.timezone.use_symlink | ||||
|   link localtime_path do | ||||
|     to timezone_data_file | ||||
|     owner 'root' | ||||
|     group 'root' | ||||
|     mode 0644 | ||||
|   end | ||||
| 
 | ||||
| else | ||||
|   file localtime_path do | ||||
|     content File.open(timezone_data_file, 'rb').read | ||||
|     owner 'root' | ||||
|     group 'root' | ||||
|     mode 0644 | ||||
|     not_if { | ||||
|       File.symlink?(localtime_path) and | ||||
|         Chef::Log.error "You must remove symbolic link at #{localtime_path}" + | ||||
|                         " or set attribute ['timezone']['use_symlink']=true" | ||||
|     } | ||||
|   end | ||||
| end  # if/else node.timezone.use_symlink | ||||
| 
 | ||||
| # vim:ts=2:sw=2: | ||||
| @ -0,0 +1 @@ | ||||
| <%= node[:tz] %> | ||||
| @ -14,3 +14,4 @@ depends 'kosmos-postfix' | ||||
| depends 'hostname' | ||||
| depends 'ufw' | ||||
| depends 'omnibus_updater' | ||||
| depends 'timezone-ii' | ||||
|  | ||||
| @ -7,6 +7,8 @@ | ||||
| # All rights reserved - Do Not Redistribute | ||||
| # | ||||
| 
 | ||||
| include_recipe 'timezone-ii' | ||||
| 
 | ||||
| node.override['omnibus_updater']['version']              = '12.4.1' | ||||
| node.override['omnibus_updater']['kill_chef_on_upgrade'] = false | ||||
| include_recipe 'omnibus_updater' | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user