Skip to content

Commit

Permalink
Revert use of dig which is Ruby 2.3+ only
Browse files Browse the repository at this point in the history
CI systems are CentOS 7 based and thus Ruby 2.0.
  • Loading branch information
ehelms authored and evgeni committed Mar 12, 2020
1 parent 2101394 commit 1df3408
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bin/ansible-vars
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ loader.load!

names = $*
boxes = names.any? ? loader.boxes.select { |name, box| names.include?(name) } : loader.boxes
puts Hash[boxes.map { |name, box| [name, box.dig('ansible', 'variables') || {}] }].to_json
puts Hash[boxes.map { |name, box| [name, (box['ansible'] || {})['variables'] || {}] }].to_json
2 changes: 1 addition & 1 deletion vagrant/lib/forklift/box_factory.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def build_box(base_box, group, playbook, version)
box = clone_hash(base_box)

variables = {}
variables = clone_hash(box['ansible']['variables']) if box.dig('ansible', 'variables')
variables = clone_hash(box['ansible']['variables']) if box['ansible'] && box['ansible']['variables']
variables.merge!(
'foreman_repositories_version' => version['foreman'],
'foreman_client_repositories_version' => version['foreman'],
Expand Down

0 comments on commit 1df3408

Please sign in to comment.