how to get tag_name instead of private ip address?

41 views
Skip to first unread message

jaehyuk choi

unread,
Jan 6, 2016, 8:47:01 AM1/6/16
to Ansible Project
when I run ansible-playbook task,
each instance results are shown with private ip.
(also I used  aws dynamic inventory)

like this....

SSH password:

PLAY [all] ********************************************************************

TASK: [check tomcat status] ***************************************************
changed: [10.248.64.31]

PLAY RECAP ********************************************************************
10.248.64.31               : ok=1    changed=1    unreachable=0    failed=0


is there any solution that represent with aws tag_Name like below

SSH password:

PLAY [all] ********************************************************************

TASK: [check tomcat status] ***************************************************
changed: [webserver1]

PLAY RECAP ********************************************************************
webserver1               : ok=1    changed=1    unreachable=0    failed=0


* aws 10.248.64.31 tag key is  Name and value is webserver1

Josh Smift

unread,
Jan 6, 2016, 9:48:29 AM1/6/16
to ansible...@googlegroups.com
Try this, in ec2.ini:

vpc_destination_variable = Name

(Or something other than Name if you want to use a different tag.)

-Josh (j...@care.com)



This email is intended for the person(s) to whom it is addressed and may contain information that is PRIVILEGED or CONFIDENTIAL. Any unauthorized use, distribution, copying, or disclosure by any person other than the addressee(s) is strictly prohibited. If you have received this email in error, please notify the sender immediately by return email and delete the message and any attachments from your system.

jaehyuk choi

unread,
Jan 11, 2016, 1:38:06 AM1/11/16
to Ansible Project, j...@care.com
Good! thanks Josh

it works well :)

2016년 1월 6일 수요일 오후 11시 48분 29초 UTC+9, Josh Smift 님의 말:
Reply all
Reply to author
Forward
0 new messages