daddy 0.5.13 → 0.5.14

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 26a219b53e199fbb5c3461d7311c2bc12c3eefb7
4
- data.tar.gz: 227e0a98edf7913f363374ccdf287f1eada8b7a1
3
+ metadata.gz: 3a5cca7d6764d60692724975965fec3f20c9b445
4
+ data.tar.gz: 1a275d8a6663a7f97c3509f428d413a4b93c90c1
5
5
  SHA512:
6
- metadata.gz: ae8e32c0a43a35622347f4b63602a50aede0c2a87b5df863d0491ce0fa43e6a67936b3a4c00e17cd308f88a96335a93343d05f98054e4fd4c8c7ba3380db4757
7
- data.tar.gz: 8592d9c232dcfd71812c578e20218ad1c0a293e1f75612a40a3288c9aaaa7c1a77c3be2b115d7cc8ff63ab7752870d6610c539f94762d2679e887d6a0410fffa
6
+ metadata.gz: d44db4037303591c32446ab4854841e2703637afa90c768755e1ecce8f39ced9f1bcf50c72d78a546dc4c521fedbe49373a3d5eeabd69e8469987361f9401f46
7
+ data.tar.gz: b69f97324591275f7fbdbd6555806b7b50153df5f6cd8b8717ea08f5a56065861c457043bca89dabff9f880c3ac209b5a96403be96cdb0081ae3a94fe7ba88e9
@@ -0,0 +1,29 @@
1
+ require 'daddy/itamae'
2
+
3
+ template '/etc/yum.repos.d/nginx.repo' do
4
+ user 'root'
5
+ owner 'root'
6
+ group 'root'
7
+ mode '644'
8
+ end
9
+
10
+ package 'nginx' do
11
+ user 'root'
12
+ end
13
+
14
+ execute 'mv -f /etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf.org' do
15
+ user 'root'
16
+ not_if 'test -e /etc/nginx/conf.d/default.conf.org'
17
+ end
18
+
19
+ template '/etc/nginx/conf.d/default.conf' do
20
+ user 'root'
21
+ owner 'root'
22
+ group 'root'
23
+ mode '644'
24
+ end
25
+
26
+ service 'nginx' do
27
+ user 'root'
28
+ action :enable
29
+ end
data/itamae/locale/en.yml CHANGED
@@ -10,4 +10,3 @@ en:
10
10
  use public key below.
11
11
 
12
12
  %{public_key}
13
-
data/itamae/locale/ja.yml CHANGED
@@ -10,4 +10,3 @@ ja:
10
10
  下記公開鍵を設定します。
11
11
 
12
12
  %{public_key}
13
-
@@ -0,0 +1,5 @@
1
+ [nginx]
2
+ name=nginx repo
3
+ baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
4
+ gpgcheck=0
5
+ enabled=1
data/lib/daddy/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Daddy
2
- VERSION = '0.5.13'
2
+ VERSION = '0.5.14'
3
3
  end
data/lib/tasks/dad.rake CHANGED
@@ -1,4 +1,4 @@
1
- require 'rake'
1
+ require_relative 'task_helper'
2
2
 
3
3
  task :dad do
4
4
  `rake -aT`.force_encoding('UTF-8').split("\n").each do |line|
@@ -1,3 +1,5 @@
1
+ # this file is auto-generated by daddy-<%= daddy_version %>
2
+
1
3
  upstream jenkins {
2
4
  server localhost:8080;
3
5
  }
@@ -4,4 +4,6 @@ en:
4
4
  jenkins:
5
5
  install: install Jenkins
6
6
  plugins:
7
- install: install Jenkins plugins
7
+ install: install Jenkins plugins
8
+ nginx:
9
+ install: install Nginx
@@ -4,4 +4,6 @@ ja:
4
4
  jenkins:
5
5
  install: Jenkinsをインストールします
6
6
  plugins:
7
- install: Jenkinsプラグインをインストールします
7
+ install: Jenkinsプラグインをインストールします
8
+ nginx:
9
+ install: Nginxをインストールします。
data/lib/tasks/nginx.rake CHANGED
@@ -3,34 +3,9 @@ require_relative 'task_helper'
3
3
  namespace :dad do
4
4
  namespace :nginx do
5
5
 
6
- desc 'Nginxをインストールします。'
6
+ desc I18n.t('nginx.install')
7
7
  task :install do
8
- repo = File.join(File.dirname(__FILE__), 'nginx', 'nginx.repo')
9
- run "sudo cp -f #{repo} /etc/yum.repos.d/"
10
-
11
- options = []
12
- options << '-y'
13
- options << '-q' if quiet?
14
- run "sudo yum #{options.join(' ')} install nginx"
15
-
16
- empty_conf = render File.join(File.dirname(__FILE__), 'nginx', 'empty.conf.erb'),
17
- :to => 'tmp/daddy/nginx/emtpy.conf'
18
-
19
- default_config_files = [
20
- '/etc/nginx/conf.d/default.conf',
21
- '/etc/nginx/conf.d/example_ssl.conf'
22
- ]
23
- default_config_files.each do |conf|
24
- if File.exist?(conf)
25
- run "sudo mv #{conf} #{conf}.org" unless File.exist?("#{conf}.org")
26
- run "sudo cp -f #{empty_conf.path} #{conf}"
27
- end
28
- end
29
-
30
- nginx_conf = render File.join(File.dirname(__FILE__), 'nginx', 'nginx.conf.erb'),
31
- :to => 'tmp/daddy/nginx/nginx.conf'
32
- run "sudo cp -f #{nginx_conf.path} /etc/nginx/conf.d/nginx.conf",
33
- "sudo mkdir -p /etc/nginx/conf.d/servers"
8
+ run_itamae 'nginx/install'
34
9
  end
35
10
 
36
11
  desc 'Nginxにアプリの設定ファイルをインストールします。'
@@ -5,6 +5,7 @@ require File.expand_path('../../daddy/version', __FILE__)
5
5
 
6
6
  require 'i18n'
7
7
  I18n.load_path += Dir.glob(File.expand_path('../../tasks/locale/*.yml', __FILE__))
8
+ I18n.locale = ENV['LANG'][0..1] if ENV['LANG']
8
9
 
9
10
  def self.daddy_version
10
11
  Daddy::VERSION
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: daddy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.13
4
+ version: 0.5.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - ichy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-27 00:00:00.000000000 Z
11
+ date: 2016-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara
@@ -257,6 +257,7 @@ files:
257
257
  - itamae/cookbooks/mysql/mysql_secure_installation.sh
258
258
  - itamae/cookbooks/netdata/install.rb
259
259
  - itamae/cookbooks/netdata/netdata-installer.sh
260
+ - itamae/cookbooks/nginx/install.rb
260
261
  - itamae/cookbooks/phantomjs/install.rb
261
262
  - itamae/locale/en.yml
262
263
  - itamae/locale/ja.yml
@@ -265,8 +266,10 @@ files:
265
266
  - itamae/templates/etc/logrotate.d/god.erb
266
267
  - itamae/templates/etc/my.cnf.d/daddy.cnf.erb
267
268
  - itamae/templates/etc/my.cnf.erb
269
+ - itamae/templates/etc/nginx/conf.d/default.conf.erb
268
270
  - itamae/templates/etc/sysconfig/jenkins.erb
269
271
  - itamae/templates/etc/yum.repos.d/docker.repo.erb
272
+ - itamae/templates/etc/yum.repos.d/nginx.repo.erb
270
273
  - lib/active_support/cache/null_store.rb
271
274
  - lib/capistrano/daddy.rb
272
275
  - lib/capistrano/tasks/update_linked_files.rake
@@ -346,9 +349,6 @@ files:
346
349
  - lib/tasks/netdata.rake
347
350
  - lib/tasks/nginx.rake
348
351
  - lib/tasks/nginx/app.conf.erb
349
- - lib/tasks/nginx/empty.conf.erb
350
- - lib/tasks/nginx/nginx.conf.erb
351
- - lib/tasks/nginx/nginx.repo
352
352
  - lib/tasks/phantomjs.rake
353
353
  - lib/tasks/publish.rake
354
354
  - lib/tasks/redis.rake
@@ -1 +0,0 @@
1
- # this file is emptified by daddy-<%= daddy_version %> at <%= Time.now.strftime('%Y-%m-%d %H:%M:%S') %>.
@@ -1,5 +0,0 @@
1
- [nginx]
2
- name=nginx repo
3
- baseurl=http://nginx.org/packages/centos/6/$basearch/
4
- gpgcheck=0
5
- enabled=1