Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docker.rb for Podman #994

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/facter/docker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,11 @@
docker_network_names.each do |network|
inspect = JSON.parse(Facter::Core::Execution.execute("#{docker_command} network inspect #{network}", timeout: 90))
docker['network'][network] = inspect[0]
network_id = docker['network'][network]['Id'][0..11]
if docker['network'][network]['Id'].nil?

Check failure on line 141 in lib/facter/docker.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 7.24, Ruby Ver: 2.7)

Style/ConditionalAssignment: Use the return of the conditional for variable assignment and comparison.

Check failure on line 141 in lib/facter/docker.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 8.0, Ruby Ver: 3.2)

Style/ConditionalAssignment: Use the return of the conditional for variable assignment and comparison.
network_id = docker['network'][network]['id'][0..11]
else

Check failure on line 143 in lib/facter/docker.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 7.24, Ruby Ver: 2.7)

Layout/IndentationStyle: Tab detected in indentation. (https://rubystyle.guide#spaces-indentation)

Check failure on line 143 in lib/facter/docker.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 8.0, Ruby Ver: 3.2)

Layout/IndentationStyle: Tab detected in indentation. (https://rubystyle.guide#spaces-indentation)
network_id = docker['network'][network]['Id'][0..11]
end

Check failure on line 145 in lib/facter/docker.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 7.24, Ruby Ver: 2.7)

Layout/IndentationStyle: Tab detected in indentation. (https://rubystyle.guide#spaces-indentation)

Check failure on line 145 in lib/facter/docker.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 8.0, Ruby Ver: 3.2)

Layout/IndentationStyle: Tab detected in indentation. (https://rubystyle.guide#spaces-indentation)
interfaces.each do |iface|
docker['network']['managed_interfaces'][iface] = network if %r{#{network_id}}.match?(iface)
end
Expand Down
Loading