itamae 1.2.12 → 1.2.13
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 +4 -4
- data/CHANGELOG.md +6 -0
- data/itamae.gemspec +1 -1
- data/lib/itamae/resource/user.rb +8 -0
- data/lib/itamae/version.txt +1 -1
- data/spec/integration/default_spec.rb +1 -0
- data/spec/integration/recipes/default.rb +2 -0
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b1f6dd38921987f3da2602ed39ac6442380a2fa9
|
4
|
+
data.tar.gz: 096bcdc139c46100637114b230f1fd210b30330c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a344becac6dd490ab6dd5ef564a5c0de644ec3e9ce8427560ec4e4e0f9a5a16dc20e6cd6c8705d98b1ad65fe301e5837b44f9e300bfb66462335b3857e593413
|
7
|
+
data.tar.gz: 91e48dc9ef2169ed3f97a6f3b3e37800d555037f4c03638433aec1f3163e921113ec9c56ca9733cc68e499e490980c37c930de37f755275ddc324acb3f19c3ca
|
data/CHANGELOG.md
CHANGED
data/itamae.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.require_paths = ["lib"]
|
19
19
|
|
20
20
|
spec.add_runtime_dependency "thor"
|
21
|
-
spec.add_runtime_dependency "specinfra", [">= 2.
|
21
|
+
spec.add_runtime_dependency "specinfra", [">= 2.29.0", "< 3.0.0"]
|
22
22
|
spec.add_runtime_dependency "hashie"
|
23
23
|
spec.add_runtime_dependency "ansi"
|
24
24
|
spec.add_runtime_dependency "schash", "~> 0.1.0"
|
data/lib/itamae/resource/user.rb
CHANGED
@@ -10,6 +10,7 @@ module Itamae
|
|
10
10
|
define_attribute :password, type: String
|
11
11
|
define_attribute :system_user, type: [TrueClass, FalseClass]
|
12
12
|
define_attribute :uid, type: Integer
|
13
|
+
define_attribute :shell, type: String
|
13
14
|
|
14
15
|
def pre_action
|
15
16
|
case @current_action
|
@@ -25,6 +26,7 @@ module Itamae
|
|
25
26
|
current.uid = run_specinfra(:get_user_uid, attributes.username).stdout.strip.to_i
|
26
27
|
current.gid = run_specinfra(:get_user_gid, attributes.username).stdout.strip.to_i
|
27
28
|
current.home = run_specinfra(:get_user_home_directory, attributes.username).stdout.strip
|
29
|
+
current.shell = run_specinfra(:get_user_login_shell, attributes.username).stdout.strip
|
28
30
|
current.password = current_password
|
29
31
|
end
|
30
32
|
end
|
@@ -50,6 +52,11 @@ module Itamae
|
|
50
52
|
run_specinfra(:update_user_home_directory, attributes.username, attributes.home)
|
51
53
|
updated!
|
52
54
|
end
|
55
|
+
|
56
|
+
if attributes.shell && attributes.shell != current.shell
|
57
|
+
run_specinfra(:update_user_login_shell, attributes.username, attributes.shell)
|
58
|
+
updated!
|
59
|
+
end
|
53
60
|
else
|
54
61
|
options = {
|
55
62
|
gid: attributes.gid,
|
@@ -57,6 +64,7 @@ module Itamae
|
|
57
64
|
password: attributes.password,
|
58
65
|
system_user: attributes.system_user,
|
59
66
|
uid: attributes.uid,
|
67
|
+
shell: attributes.shell,
|
60
68
|
}
|
61
69
|
|
62
70
|
run_specinfra(:add_user, attributes.username, options)
|
data/lib/itamae/version.txt
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.2.
|
1
|
+
1.2.13
|
@@ -12,6 +12,7 @@ user "create itamae user" do
|
|
12
12
|
username "itamae"
|
13
13
|
password "$1$ltOY8bZv$iZ57f1KAp8jwKViNm3pze."
|
14
14
|
home '/home/foo'
|
15
|
+
shell '/bin/sh'
|
15
16
|
end
|
16
17
|
|
17
18
|
user "update itamae user" do
|
@@ -19,6 +20,7 @@ user "update itamae user" do
|
|
19
20
|
username "itamae"
|
20
21
|
password "$1$TQz9gPMl$nHYrsA5W2ZdZ0Yn021BQH1"
|
21
22
|
home '/home/itamae'
|
23
|
+
shell '/bin/dash'
|
22
24
|
end
|
23
25
|
|
24
26
|
######
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: itamae
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryota Arai
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -30,7 +30,7 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 2.
|
33
|
+
version: 2.29.0
|
34
34
|
- - "<"
|
35
35
|
- !ruby/object:Gem::Version
|
36
36
|
version: 3.0.0
|
@@ -40,7 +40,7 @@ dependencies:
|
|
40
40
|
requirements:
|
41
41
|
- - ">="
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version: 2.
|
43
|
+
version: 2.29.0
|
44
44
|
- - "<"
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: 3.0.0
|
@@ -262,7 +262,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
262
262
|
version: '0'
|
263
263
|
requirements: []
|
264
264
|
rubyforge_project:
|
265
|
-
rubygems_version: 2.
|
265
|
+
rubygems_version: 2.4.5
|
266
266
|
signing_key:
|
267
267
|
specification_version: 4
|
268
268
|
summary: Simple Configuration Management Tool
|