Last active
December 21, 2015 20:49
-
-
Save ilyash/6363673 to your computer and use it in GitHub Desktop.
Quick and dirty hosts' file lines from Chef
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
knife exec -E 'nodes.all.sort_by(&:name).each do |node| puts "#{printf "%-16s",node.ipaddress} #{node.name}" end' | |
# or | |
knife exec -E 'nodes.all.sort_by(&:ipaddress).each do |node| puts "#{printf "%-16s",node.ipaddress} #{node.name}" end' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment