itamae 1.15.0 → 1.16.0

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
  SHA256:
3
- metadata.gz: 12b8fcd57c70cc4c440ccd46a34786f1ac43a6bc7f4b66b68598ffeecfe9daaf
4
- data.tar.gz: c1e77510842948b7cc4222e566939e8e32c1540d4b09178dc6492449b38d98c2
3
+ metadata.gz: 7ef6795dde3ca26714bacd337ff417b94311ab235129bb3c446dff78fe995a25
4
+ data.tar.gz: 38fa0a621dc23641bd6f687641a4166a7e2847c785f2ec8a3bc14af68389b8b9
5
5
  SHA512:
6
- metadata.gz: 4d033e29941f7cc56de7626d1b3bdee2e00d1adca58e13c2927c4f3a1202046d80427eb614111424c8e21cc43c2bf480009069782fa5faebfdbf2f9dcd7fdbc5
7
- data.tar.gz: bd55aa58068d1ec98b5bc74e4e6829d7e0927f575e352289b74801916ebab2f9e511a4b197a947da538c033b0d054af39dc91209facc0e1e74b797c0da07b599
6
+ metadata.gz: fd68eea56783bc753a395c190efb9a7659a1379adc319f914a72ca21b146ba56e02ffb7235576f07c628c6ce3050e5616a740ae1983ab16781b0276a3119d9b7
7
+ data.tar.gz: aff4cfc9b326ed41469c803be53bcc4f92b6fbedf8c24e0e071136887d0595e6e7b31fee43508367e78555801938e83a4839a1e53224a876be0605bafa6ef24d
@@ -0,0 +1,49 @@
1
+ # This file is machine-generated by `gh actions-lock`.
2
+ # Do not edit by hand; run `gh actions-lock` to update.
3
+ # Docs: https://gh.io/actions-lockfile
4
+ version: 'v0.0.3'
5
+ workflows:
6
+ '.github/workflows/release.yml':
7
+ - 'actions/checkout@v7.0.1'
8
+ - 'ruby/setup-ruby@v1.335.0'
9
+ - 'rubygems/release-gem@v1.4.1'
10
+ - 'step-security/harden-runner@v2.22.2'
11
+ '.github/workflows/test.yml':
12
+ - 'act10ns/slack@v2.2.0'
13
+ '.github/workflows/test_main.yml':
14
+ - 'act10ns/slack@v2.2.0'
15
+ - 'actions/checkout@v7.0.1'
16
+ - 'ruby/setup-ruby@v1.335.0'
17
+ dependencies:
18
+ 'act10ns/slack@v2.2.0':
19
+ ref: 'v2.2.0'
20
+ commit: 'sha1-d96404edccc6d6467fc7f8134a420c851b1e9054'
21
+ owner_id: 65077766
22
+ repo_id: 262583918
23
+ 'actions/checkout@v7.0.1':
24
+ ref: 'v7.0.1'
25
+ commit: 'sha1-3d3c42e5aac5ba805825da76410c181273ba90b1'
26
+ owner_id: 44036562
27
+ repo_id: 197814629
28
+ 'ruby/setup-ruby@v1.335.0':
29
+ ref: 'v1.335.0'
30
+ commit: 'sha1-7f797815d8adceb1c412e7abefdd1ab4abc47a5f'
31
+ owner_id: 210414
32
+ repo_id: 231208785
33
+ 'rubygems/configure-rubygems-credentials@dc5a8d8553e6ee01fc26761a49e99e733d17954a':
34
+ ref: 'v2.1.0'
35
+ commit: 'sha1-dc5a8d8553e6ee01fc26761a49e99e733d17954a'
36
+ owner_id: 208761
37
+ repo_id: 631633510
38
+ 'rubygems/release-gem@v1.4.1':
39
+ ref: 'v1.4.1'
40
+ commit: 'sha1-7f9650160c1a4e7989fdc9855807bdbd421d8b6b'
41
+ owner_id: 208761
42
+ repo_id: 731435765
43
+ uses:
44
+ - 'rubygems/configure-rubygems-credentials@dc5a8d8553e6ee01fc26761a49e99e733d17954a'
45
+ 'step-security/harden-runner@v2.22.2':
46
+ ref: 'v2.22.2'
47
+ commit: 'sha1-dc2769abcc0fcfbadfc1df54081c1608579ef6b2'
48
+ owner_id: 88700172
49
+ repo_id: 422287306
@@ -18,20 +18,20 @@ jobs:
18
18
 
19
19
  steps:
20
20
  - name: Harden Runner
21
- uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0
21
+ uses: step-security/harden-runner@v2.22.2
22
22
  with:
23
23
  egress-policy: audit
24
24
 
25
- - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
25
+ - uses: actions/checkout@v7.0.1
26
26
 
27
27
  - name: Set up Ruby
28
- uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
28
+ uses: ruby/setup-ruby@v1.335.0
29
29
  with:
30
30
  bundler-cache: true
31
31
  ruby-version: ruby
32
32
 
33
33
  - name: Publish to RubyGems
34
- uses: rubygems/release-gem@052cc82692552de3ef2b81fd670e41d13cba8092 # v1.4.0
34
+ uses: rubygems/release-gem@v1.4.1
35
35
 
36
36
  - name: Create GitHub release
37
37
  run: |
@@ -90,7 +90,7 @@ jobs:
90
90
  - ruby: "3.4"
91
91
  rubyopt: "--zjit"
92
92
 
93
- uses: ./.github/workflows/test_main.yml
93
+ uses: $/.github/workflows/test_main.yml
94
94
  with:
95
95
  ruby: ${{ matrix.ruby }}
96
96
  rubyopt: ${{ matrix.rubyopt }}
@@ -105,7 +105,7 @@ jobs:
105
105
 
106
106
  steps:
107
107
  - name: Slack Notification (success)
108
- uses: act10ns/slack@d96404edccc6d6467fc7f8134a420c851b1e9054 # v2.2.0
108
+ uses: act10ns/slack@v2.2.0
109
109
  if: always()
110
110
  continue-on-error: true
111
111
  with:
@@ -16,12 +16,12 @@ on:
16
16
 
17
17
  jobs:
18
18
  unit:
19
- runs-on: ubuntu-latest
19
+ runs-on: ${{ case(inputs.ruby < '3.2', 'ubuntu-24.04', 'ubuntu-latest') }}
20
20
 
21
21
  steps:
22
- - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
22
+ - uses: actions/checkout@v7.0.1
23
23
 
24
- - uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
24
+ - uses: ruby/setup-ruby@v1.335.0
25
25
  with:
26
26
  ruby-version: ${{ inputs.ruby }}
27
27
  bundler-cache: true
@@ -34,7 +34,7 @@ jobs:
34
34
  RUBYOPT: ${{ inputs.rubyopt }}
35
35
 
36
36
  - name: Slack Notification (not success)
37
- uses: act10ns/slack@d96404edccc6d6467fc7f8134a420c851b1e9054 # v2.2.0
37
+ uses: act10ns/slack@v2.2.0
38
38
  if: "! success()"
39
39
  continue-on-error: true
40
40
  with:
@@ -43,7 +43,7 @@ jobs:
43
43
  inputs: ${{ toJson(inputs) }}
44
44
 
45
45
  integration-docker:
46
- runs-on: ubuntu-latest
46
+ runs-on: ${{ case(inputs.ruby < '3.2', 'ubuntu-24.04', 'ubuntu-latest') }}
47
47
 
48
48
  strategy:
49
49
  fail-fast: false
@@ -56,14 +56,14 @@ jobs:
56
56
  TEST_IMAGE: ${{ matrix.image }}
57
57
 
58
58
  steps:
59
- - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
59
+ - uses: actions/checkout@v7.0.1
60
60
 
61
61
  - name: Pull Docker Hub images through mirror.gcr.io
62
62
  run: |
63
63
  sudo cp .github/workflows/docker-daemon.json /etc/docker/daemon.json
64
64
  sudo systemctl restart docker
65
65
 
66
- - uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
66
+ - uses: ruby/setup-ruby@v1.335.0
67
67
  with:
68
68
  ruby-version: ${{ inputs.ruby }}
69
69
  bundler-cache: true
@@ -100,7 +100,7 @@ jobs:
100
100
  RUBYOPT: ${{ inputs.rubyopt }}
101
101
 
102
102
  - name: Slack Notification (not success)
103
- uses: act10ns/slack@d96404edccc6d6467fc7f8134a420c851b1e9054 # v2.2.0
103
+ uses: act10ns/slack@v2.2.0
104
104
  if: "! success()"
105
105
  continue-on-error: true
106
106
  with:
@@ -109,20 +109,20 @@ jobs:
109
109
  matrix: ${{ toJson(matrix) }}
110
110
 
111
111
  integration-local:
112
- runs-on: ubuntu-latest
112
+ runs-on: ${{ case(inputs.ruby < '3.2', 'ubuntu-24.04', 'ubuntu-latest') }}
113
113
 
114
- # NOTE: When ruby is 2.5, tests run on buster. But buster is already EOL and didn't work apt-get
115
- if: ${{ inputs.ruby >= '2.6' }}
114
+ # NOTE: When ruby is 3.0, tests run on bullseye. But bullseye is already EOL and didn't work apt-get
115
+ if: ${{ inputs.ruby >= '3.1' }}
116
116
 
117
117
  steps:
118
- - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
118
+ - uses: actions/checkout@v7.0.1
119
119
 
120
120
  - name: Pull Docker Hub images through mirror.gcr.io
121
121
  run: |
122
122
  sudo cp .github/workflows/docker-daemon.json /etc/docker/daemon.json
123
123
  sudo systemctl restart docker
124
124
 
125
- - uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
125
+ - uses: ruby/setup-ruby@v1.335.0
126
126
  with:
127
127
  ruby-version: ${{ inputs.ruby }}
128
128
  bundler-cache: true
@@ -139,7 +139,7 @@ jobs:
139
139
  RUBYOPT: ${{ inputs.rubyopt }}
140
140
 
141
141
  - name: Slack Notification (not success)
142
- uses: act10ns/slack@d96404edccc6d6467fc7f8134a420c851b1e9054 # v2.2.0
142
+ uses: act10ns/slack@v2.2.0
143
143
  if: "! success()"
144
144
  continue-on-error: true
145
145
  with:
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  ## Unreleased
2
- [full changelog](https://github.com/itamae-kitchen/itamae/compare/v1.15.0...master)
2
+ [full changelog](https://github.com/itamae-kitchen/itamae/compare/v1.16.0...master)
3
+
4
+ ## v1.16.0
5
+ [full changelog](https://github.com/itamae-kitchen/itamae/compare/v1.15.0...v1.16.0)
6
+
7
+ Improvements
8
+
9
+ - [Add --ask-passphrase option to ssh command](https://github.com/itamae-kitchen/itamae/pull/460)
3
10
 
4
11
  ## v1.15.0
5
12
  [full changelog](https://github.com/itamae-kitchen/itamae/compare/v1.14.2...v1.15.0)
data/Gemfile CHANGED
@@ -14,7 +14,9 @@ end
14
14
 
15
15
  # FIXME: Delete the following after https://github.com/fakefs/fakefs/pull/494 is merged and released
16
16
  if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("4.0.0.preview2")
17
+ gem "bcrypt_pbkdf"
17
18
  gem "english"
19
+ gem "fiddle"
18
20
  gem "fileutils"
19
21
  gem "find"
20
22
  gem "irb"
data/itamae.gemspec CHANGED
@@ -34,6 +34,7 @@ Gem::Specification.new do |spec|
34
34
  spec.add_runtime_dependency "schash", "~> 0.1.0"
35
35
 
36
36
  spec.add_development_dependency "bundler", ">= 1.3"
37
+ spec.add_development_dependency "json"
37
38
  spec.add_development_dependency "rake"
38
39
  spec.add_development_dependency "rspec", "~> 3.0"
39
40
  spec.add_development_dependency "serverspec", "~> 2.43"
@@ -285,6 +285,8 @@ module Itamae
285
285
  opts.merge!(password: password)
286
286
  end
287
287
 
288
+ opts[:passphrase] = @options[:passphrase] if @options[:passphrase]
289
+
288
290
  opts
289
291
  end
290
292
 
data/lib/itamae/cli.rb CHANGED
@@ -59,6 +59,7 @@ module Itamae
59
59
  option :ssh_config, type: :string
60
60
  option :vagrant, type: :boolean, default: false
61
61
  option :ask_password, type: :boolean, default: false
62
+ option :ask_passphrase, type: :boolean, default: false
62
63
  option :sudo, type: :boolean, default: true
63
64
  def ssh(*recipe_files)
64
65
  if recipe_files.empty?
@@ -69,7 +70,14 @@ module Itamae
69
70
  raise "Please set '-h <hostname>' or '--vagrant'"
70
71
  end
71
72
 
72
- run(recipe_files, :ssh, options)
73
+ opts = options.dup
74
+ if options[:ask_passphrase]
75
+ print "passphrase: "
76
+ opts[:passphrase] = STDIN.noecho(&:gets).strip
77
+ puts
78
+ end
79
+
80
+ run(recipe_files, :ssh, opts)
73
81
  end
74
82
 
75
83
  desc "docker RECIPE [RECIPE...]", "Create Docker image"
@@ -1,3 +1,3 @@
1
1
  module Itamae
2
- VERSION = "1.15.0"
2
+ VERSION = "1.16.0"
3
3
  end
@@ -282,7 +282,7 @@ git "/tmp/git_repo" do
282
282
  end
283
283
 
284
284
  git "/tmp/git_repo_submodule" do
285
- repository "https://github.com/mmasaki/fake_repo_including_submodule.git"
285
+ repository "https://github.com/itamae-kitchen/fake_repo_including_submodule.git"
286
286
  recursive true
287
287
  end
288
288
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: itamae
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.15.0
4
+ version: 1.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryota Arai
@@ -101,6 +101,20 @@ dependencies:
101
101
  - - ">="
102
102
  - !ruby/object:Gem::Version
103
103
  version: '1.3'
104
+ - !ruby/object:Gem::Dependency
105
+ name: json
106
+ requirement: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ type: :development
112
+ prerelease: false
113
+ version_requirements: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
104
118
  - !ruby/object:Gem::Dependency
105
119
  name: rake
106
120
  requirement: !ruby/object:Gem::Requirement
@@ -209,6 +223,7 @@ extensions: []
209
223
  extra_rdoc_files: []
210
224
  files:
211
225
  - ".github/dependabot.yml"
226
+ - ".github/workflows/actions.lock"
212
227
  - ".github/workflows/docker-daemon.json"
213
228
  - ".github/workflows/release.yml"
214
229
  - ".github/workflows/test.yml"
@@ -334,7 +349,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
334
349
  - !ruby/object:Gem::Version
335
350
  version: '0'
336
351
  requirements: []
337
- rubygems_version: 4.0.16
352
+ rubygems_version: 4.0.20
338
353
  specification_version: 4
339
354
  summary: Simple Configuration Management Tool
340
355
  test_files: