subspace 1.0.3 → 1.0.4

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: 4c3f6319ec9013e9d51e1165b66af7d3d7da4290
4
- data.tar.gz: 37f5bbc936114bf1e4b81e1339b0672af9f9fc1a
3
+ metadata.gz: d685d102ccd5aab546e77d660dfc7c8dcf25c2ee
4
+ data.tar.gz: 7fd7f5d5cb9b04a97872ce5e8d5b3ccd90700acd
5
5
  SHA512:
6
- metadata.gz: 8824c02b847c362902f719bc734ee0f76d07f7c5d129dff02b1f3504f45bdb8b46480c3ccbeb0339db1007aadbabc1fa842d417e65ef32d5a50aa3dc1d743946
7
- data.tar.gz: bb878f2d31e8d581358c2b2ce50b8b6c44c0e261c4ffdb55c98b54036550a780824c29c3636f8758decb81756bfd141036c00f0a74c8cc179093769c93ad0d23
6
+ metadata.gz: 44ac08b92ec270e6f838ea9f8e4b2cced96c99a0f0f088889282a4182268d6aeed714bf8758a63921d7a1724aca8cefa819a52a7f31078cb800e12551b81b20b
7
+ data.tar.gz: ed6b80fa239c6e6ca40dd3115fb0ac515249f0bfe21f03018833365dd6394e6a3e5b268e429c3df7e6339904b066f63607f0b85fa283416e0e2eebb69787d09f
data/CHANGELOG.md CHANGED
@@ -8,6 +8,14 @@ This project attempts to follow [semantic versioning](https://semver.org/)
8
8
 
9
9
  * _nada_
10
10
 
11
+ ## 1.0.4 - 2018-10-18
12
+
13
+ * enhancement
14
+ * Add way to specify private key when running the bootstrap command.
15
+ * Add way to specify only certain hosts to run the playbook on when running the
16
+ provision command.
17
+ * The common role now runs `apt-get autoremove` after doing the update and upgrade.
18
+
11
19
  ## 1.0.3 - 2018-10-08
12
20
 
13
21
  * bug fixes
@@ -49,6 +49,13 @@
49
49
  tags:
50
50
  - upgrade
51
51
 
52
+ - name: apt-get autoremove
53
+ apt:
54
+ autoremove: true
55
+ become: true
56
+ tags:
57
+ - upgrade
58
+
52
59
  - name: Set timezone variables
53
60
  copy: content='America/Chicago'
54
61
  dest=/etc/timezone
@@ -4,7 +4,7 @@ This server brought to you by:
4
4
  \___ \| | | | '_ \___ \| '_ \ / _` |/ __/ _ \
5
5
  ___) | |_| | |_) |__) | |_) | (_| | (_| __/
6
6
  |____/ \__,_|_.__/____/| .__/ \__,_|\___\___|
7
- |_| v1.0.3
7
+ |_| v1.0.4
8
8
  ~~~ https://github.com/tenforwardconsulting/subspace ~~~
9
9
 
10
10
  If you need to make configuration changes to the server, please modify the
data/lib/subspace/cli.rb CHANGED
@@ -39,6 +39,9 @@ class Subspace::Cli
39
39
  copy the authorized_keys file. You will possibly need to type a password here.'
40
40
  c.option '--password', "Ask for a password instead of using ssh keys"
41
41
  c.option '--yum', "Use yum instead of apt to install python"
42
+ Subspace::Commands::Bootstrap::PASS_THROUGH_PARAMS.each do |param_name|
43
+ c.option "--#{param_name} #{param_name.upcase}", "Passed directly through to ansible-playbook command"
44
+ end
42
45
  c.when_called Subspace::Commands::Bootstrap
43
46
  end
44
47
 
@@ -1,6 +1,9 @@
1
1
  class Subspace::Commands::Bootstrap < Subspace::Commands::Base
2
+ PASS_THROUGH_PARAMS = ["private-key"]
3
+
2
4
  def initialize(args, options)
3
5
  @host_spec = args.first
6
+ @options = options
4
7
  @ask_pass = options.password
5
8
  @yum = options.yum
6
9
  run
@@ -23,6 +26,7 @@ class Subspace::Commands::Bootstrap < Subspace::Commands::Base
23
26
  "path=/home/{{ansible_ssh_user}}/.ssh state=directory mode=0700",
24
27
  "-vvvv"
25
28
  ]
29
+ cmd = add_pass_through_params cmd
26
30
  bootstrap_command cmd
27
31
  end
28
32
 
@@ -37,6 +41,7 @@ class Subspace::Commands::Bootstrap < Subspace::Commands::Base
37
41
  "--become",
38
42
  "-vvvv"
39
43
  ]
44
+ cmd = add_pass_through_params cmd
40
45
  bootstrap_command cmd
41
46
  end
42
47
 
@@ -47,4 +52,15 @@ class Subspace::Commands::Bootstrap < Subspace::Commands::Base
47
52
  ansible_command *cmd
48
53
  end
49
54
 
55
+ def add_pass_through_params(cmd)
56
+ PASS_THROUGH_PARAMS.each do |param_name|
57
+ x = param_name.split('-')[1..-1].map(&:upcase).join('_')
58
+ hash_key = (param_name.gsub('-', '_') + (x == '' ? '' : "_#{x}")).to_sym
59
+ value = @options.__hash__[hash_key]
60
+ if value
61
+ cmd += ["--#{param_name}", value]
62
+ end
63
+ end
64
+ cmd
65
+ end
50
66
  end
@@ -1,5 +1,5 @@
1
1
  class Subspace::Commands::Provision < Subspace::Commands::Base
2
- PASS_THROUGH_PARAMS = ["tags", "start-at-task", "private-key"]
2
+ PASS_THROUGH_PARAMS = ["tags", "start-at-task", "private-key", "limit"]
3
3
 
4
4
  def initialize(args, options)
5
5
  @environment = args.first
@@ -1,3 +1,3 @@
1
1
  module Subspace
2
- VERSION = "1.0.3"
2
+ VERSION = "1.0.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: subspace
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Samson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-10-08 00:00:00.000000000 Z
11
+ date: 2018-10-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler