Showing
4 changed files
with
23 additions
and
15 deletions
@@ -3,8 +3,8 @@ source "https://supermarket.chef.io" | @@ -3,8 +3,8 @@ source "https://supermarket.chef.io" | ||
3 | metadata | 3 | metadata |
4 | 4 | ||
5 | cookbook 'cfe-users', git: 'https://gitlab.chromedia.com/ops/cfe-users.git', tag: 'v0.1.1' | 5 | cookbook 'cfe-users', git: 'https://gitlab.chromedia.com/ops/cfe-users.git', tag: 'v0.1.1' |
6 | -cookbook 'cfe-mariadb', git: 'https://gitlab.chromedia.com/ops/cfe-mariadb.git', tag: 'v0.5.0' | ||
7 | -cookbook 'backup-file2s3', git: 'https://gitlab.chromedia.com/ops/backup-file2s3.git', tag: 'v0.3.3' | 6 | +cookbook 'cfe-mariadb', git: 'https://gitlab.chromedia.com/ops/cfe-mariadb.git', tag: 'v0.5.1' |
7 | +cookbook 'backup-file2s3', git: 'https://gitlab.chromedia.com/ops/backup-file2s3.git', tag: 'v0.4.0' | ||
8 | cookbook 'cfe-nginx-php-fpm', git: 'https://gitlab.chromedia.com/ops/cfe-nginx-php-fpm.git', tag: 'v0.5.2' | 8 | cookbook 'cfe-nginx-php-fpm', git: 'https://gitlab.chromedia.com/ops/cfe-nginx-php-fpm.git', tag: 'v0.5.2' |
9 | cookbook 'cfe-simple-iptables', git: 'https://gitlab.chromedia.com/ops/cfe-simple-iptables.git', tag: 'v0.1.0' | 9 | cookbook 'cfe-simple-iptables', git: 'https://gitlab.chromedia.com/ops/cfe-simple-iptables.git', tag: 'v0.1.0' |
10 | 10 |
1 | +## 0.1.2 - 2016-12-13 | ||
2 | +### Changed | ||
3 | +- Updated dependency versions. | ||
4 | +- Added proper attributes to 'aws_tar_extract' definition calls to account for new version of the cookbook 'backup-file2s3'. | ||
5 | + | ||
1 | ## 0.1.1 - 2016-12-09 | 6 | ## 0.1.1 - 2016-12-09 |
2 | ### Added | 7 | ### Added |
3 | - Include cookbook 'cfe-simple-iptables'. Also automatically add iptables that are listed in a secret data bag (see default attribute file). | 8 | - Include cookbook 'cfe-simple-iptables'. Also automatically add iptables that are listed in a secret data bag (see default attribute file). |
@@ -4,7 +4,7 @@ maintainer_email 'sysadmin@chromedia.com' | @@ -4,7 +4,7 @@ maintainer_email 'sysadmin@chromedia.com' | ||
4 | license 'Apache License' | 4 | license 'Apache License' |
5 | description 'Simplifies setting up common Linux servers.' | 5 | description 'Simplifies setting up common Linux servers.' |
6 | long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) | 6 | long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) |
7 | -version '0.1.1' | 7 | +version '0.1.2' |
8 | 8 | ||
9 | %w{ | 9 | %w{ |
10 | cfe-users cfe-mariadb | 10 | cfe-users cfe-mariadb |
@@ -35,25 +35,28 @@ end | @@ -35,25 +35,28 @@ end | ||
35 | 35 | ||
36 | if node['backup-file2s3']['backups'] | 36 | if node['backup-file2s3']['backups'] |
37 | node['backup-file2s3']['backups'].each do |xback| | 37 | node['backup-file2s3']['backups'].each do |xback| |
38 | + xbucket = xback[:bucket] | ||
39 | + xregion = xback[:region] | ||
40 | + | ||
38 | xback[:paths].each do |xpath| | 41 | xback[:paths].each do |xpath| |
39 | 42 | ||
40 | # Each path spec can have the following additional attributes: | 43 | # Each path spec can have the following additional attributes: |
41 | # { | 44 | # { |
42 | - # :extract => true, # Default: true | ||
43 | - # :ex_creates => 'filename', # Relative to path. | ||
44 | - # :ex_priv_key => nil # Default is a node attribute | 45 | + # :extract => true, # Default: true |
46 | + # :ex_creates => 'filename' # Relative to path. | ||
45 | # } | 47 | # } |
46 | unless xpath.has_key?(:extract) && xpath[:extract] == false | 48 | unless xpath.has_key?(:extract) && xpath[:extract] == false |
47 | - tdir = ::File.dirname(xpath[:path]) | ||
48 | - crea = "#{xpath[:path]}/#{xpath[:ex_creates]}" | ||
49 | - encr = xpath[:bak_encrypted] | ||
50 | - pkey = xpath.has_key?(:ex_priv_key) ? xpath[:ex_priv_key] : nil | 49 | + ptarget_dir = ::File.dirname(xpath[:path]) |
50 | + pcreates = "#{xpath[:path]}/#{xpath[:ex_creates]}" | ||
51 | + pencrypted = xpath[:bak_encrypted] | ||
52 | + pfname = xpath[:bak_filename] || ::File.basename(xpath[:path]) | ||
51 | 53 | ||
52 | - aws_tar_extract xpath[:bak_filename] do | ||
53 | - target_dir tdir | ||
54 | - creates crea | ||
55 | - encrypted encr | ||
56 | - priv_key pkey | 54 | + aws_tar_extract pfname do |
55 | + target_dir ptarget_dir | ||
56 | + creates pcreates | ||
57 | + encrypted pencrypted | ||
58 | + bucket xbucket | ||
59 | + region xregion | ||
57 | end | 60 | end |
58 | end | 61 | end |
59 | 62 |