Ansible cli argument from with ansible-play

13 views
Skip to first unread message

Eric Marquez

unread,
Sep 8, 2016, 10:12:50 AM9/8/16
to ansible-project (ansible-project@googlegroups.com)
Can somebody give me a pointer for using CLI commands with Ansible-Play.

I working with a group of network devices and I need to issue the same command to all of them to find a specific IP address in the arp table. I would like to do something like the following:

Ansible-play myplay myip=10.10.0.1

Use that myip address in the Ansible-play as a jinja2 variable in my role.


- name: run show arp on remote devices

eos_command:

commands: show arp {{ myip }}

provider "{{ cli }}"
winmail.dat

Eric Marquez

unread,
Sep 8, 2016, 10:52:38 AM9/8/16
to ansible...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages