I can currently fetch one attribute of a node at a time via knife search node
like this:
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 retrieve two attributes simultaneously via a single invocation, something like this:
knife search node "chef_environment:production AND name:i-7a421114" -a cloud.public_hostname -a cloud.local_hostname
Of course, this doesn't work, only one attribute is obtained. Since I have almost no chef/knife knowledge, could someone let me know how to do this, or some other way to achieve this.