dev-lxc 0.6.3 → 0.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3c4caf061044c84378f0ddc6f2b230bf471316bd
4
- data.tar.gz: 38604c98358572ef9c01cdf0b5bb3c123d12909e
3
+ metadata.gz: 292b5df53d047927c96eb8d73e13739b17c57c99
4
+ data.tar.gz: 3e696698a4ab38c75ef4cd428637b8ed95d21a6d
5
5
  SHA512:
6
- metadata.gz: 3f21d2ec078c477fb6d1d3c2bed8329ecc2d09dba2f2f9e5f2683ca73fc7ae40b6992d687588b0478b5fc149e6e30c4fbd8323dcfa5ece1fb36d8224aea5881f
7
- data.tar.gz: a4045af580cc0c357c6799ef29e4eb0b8785ec40a431897e63976b4cdd6394e26ebadebaaf08b763937118b54f9af3bb11a2d927193d6eb67d92f2585c7e8743
6
+ metadata.gz: 5f7bba6ca362e9f8de32c9702ebb9eca1af73f78f4049c63e39f1dd865423fb059f69ea9e4e67414d473fb35d181c9327a40e59fe38b80c5ced151abb2a24a15
7
+ data.tar.gz: 916d5ce93646952a3e69f858471a4dc837b01c3acc16a2e89b4d1c64f593fb2fc08fe2439620be12ab2c804aebb7353260df932711b0845ab194b9a98f853856
@@ -77,9 +77,10 @@ module DevLXC::CLI
77
77
 
78
78
  desc "chef-repo", "Creates a `bootstrap-node` script and chef-repo in the current directory using files from the cluster's backend /root/chef-repo"
79
79
  option :config, :desc => "Specify a cluster's YAML config file. `./dev-lxc.yml` will be used by default"
80
+ option :force, :aliases => "-f", :type => :boolean, :desc => "Overwrite any existing knife.rb or pivotal.rb files"
80
81
  option :pivotal, :aliases => "-p", :type => :boolean, :desc => "Also copy pivotal.rb and pivotal.pem"
81
82
  def chef_repo
82
- get_cluster(options[:config]).chef_repo(options[:pivotal])
83
+ get_cluster(options[:config]).chef_repo(options[:force], options[:pivotal])
83
84
  end
84
85
 
85
86
  desc "list_images [SERVER_NAME_REGEX]", "List of each servers' images created during the build process"
@@ -58,7 +58,7 @@ module DevLXC
58
58
  servers = chef_servers + analytics_servers
59
59
  end
60
60
 
61
- def chef_repo(copy_pivotal=false)
61
+ def chef_repo(force=false, pivotal=false)
62
62
  if @chef_server_bootstrap_backend.nil?
63
63
  puts "A bootstrap backend Chef Server is not defined in the cluster's config. Please define it first."
64
64
  exit 1
@@ -76,7 +76,7 @@ module DevLXC
76
76
  if pem_files.empty?
77
77
  puts "The pem files can not be copied because they do not exist in '#{chef_server.server.name}' Chef Server's `/root/chef-repo/.chef` directory"
78
78
  else
79
- pem_files.delete_if { |pem_file| pem_file.end_with?("/pivotal.pem") } unless copy_pivotal
79
+ pem_files.delete_if { |pem_file| pem_file.end_with?("/pivotal.pem") } unless pivotal
80
80
  FileUtils.cp( pem_files, "./chef-repo/.chef" )
81
81
  end
82
82
 
@@ -88,8 +88,8 @@ module DevLXC
88
88
  chef_server_url = "https://#{@api_fqdn}/organizations/ponyville"
89
89
  validator_name = "ponyville-validator"
90
90
 
91
- if copy_pivotal
92
- if File.exists?("./chef-repo/.chef/pivotal.rb")
91
+ if pivotal
92
+ if File.exists?("./chef-repo/.chef/pivotal.rb") && ! force
93
93
  puts "Skipping pivotal.rb because it already exists in `./chef-repo/.chef`"
94
94
  else
95
95
  pivotal_rb_path = "#{chef_server.abspath('/root/chef-repo/.chef')}/pivotal.rb"
@@ -105,7 +105,7 @@ module DevLXC
105
105
  end
106
106
  end
107
107
 
108
- if File.exists?("./chef-repo/.chef/knife.rb")
108
+ if File.exists?("./chef-repo/.chef/knife.rb") && ! force
109
109
  puts "Skipping knife.rb because it already exists in `./chef-repo/.chef`"
110
110
  else
111
111
  knife_rb_path = "#{chef_server.abspath('/root/chef-repo/.chef')}/knife.rb"
@@ -1,3 +1,3 @@
1
1
  module DevLXC
2
- VERSION = "0.6.3"
2
+ VERSION = "0.6.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dev-lxc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremiah Snapp
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-28 00:00:00.000000000 Z
11
+ date: 2015-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler