Skip to content

Commit

Permalink
make all output controllable
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Spiers committed Feb 21, 2018
1 parent 4def380 commit eebf111
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions lib/ansible_viz/grapher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def cut(g, options)
descriptor = "%s:%s" % [n.data[:type], n.data[:fqn]]
exclude = descriptor =~ options.exclude_nodes
if exclude
puts "Excluding node #{descriptor}"
debug 3, "Excluding node #{descriptor}"
end
exclude
}
Expand All @@ -59,7 +59,7 @@ def cut(g, options)
]
exclude = descriptor =~ options.exclude_edges
if exclude
puts "Excluding edge #{descriptor}"
debug 3, "Excluding edge #{descriptor}"
end
exclude
}
Expand Down
10 changes: 5 additions & 5 deletions lib/ansible_viz/postprocessor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ def process_playbook(dict, playbook)
role_or_name['role'] : role_or_name
role = dict[:role].find {|r| r[:name] == role_name }
unless role
$stderr.puts "WARNING: Couldn't find role '#{role_name}' "\
"(invoked by playbook '#{playbook[:name]}')"
debug 1, "WARNING: Couldn't find role '#{role_name}' "\
"(invoked by playbook '#{playbook[:name]}')"
end
role
}.compact
Expand All @@ -116,9 +116,9 @@ def process_playbook(dict, playbook)
rolename, taskname = $1, $2
role = dict[:role].find {|r| r[:name] == rolename }
unless role
$stderr.puts "WARNING: Couldn't find role '#{rolename}' " \
"(referenced by task '#{taskname}' included by " \
"playbook '#{playbook[:fqn]}')"
debug 1, "WARNING: Couldn't find role '#{rolename}' " \
"(referenced by task '#{taskname}' included by " \
"playbook '#{playbook[:fqn]}')"
next nil
end
debug 4, " found task's role #{role[:fqn]}"
Expand Down

0 comments on commit eebf111

Please sign in to comment.