Currently, I can get one node attribute through knife search node as follows:
knife search node "chef_environment:production AND name:i-7a421114" -a cloud.public_hostname # RESULT: i-7a421114: cloud.public_hostname: ec2-104-214-107-198.compute-1.amazonaws.com knife search node "chef_environment:production AND name:i-7a421114" -a cloud.local_hostname # RESULT: i-7a421114: cloud.local_hostname: ip-10-60-146-201.ec2.internal
I want to get two attributes at the same time with a single call, something like this:
knife search node "chef_environment:production AND name:i-7a421114" -a cloud.public_hostname -a cloud.local_hostname
Of course, this does not work, only one attribute is obtained. Since I have almost no knowledge of the cook / knife, someone can let me know how to do this, or in some other way to achieve this.
source share