I found the answer to my own question. http://docs.ansible.com/ansible/playbooks_variables.html#passing-variables-on-the-command-line
From: [email protected] [mailto:[email protected]] On Behalf Of Eric Marquez Sent: Thursday, September 8, 2016 7:12 AM To: ansible-project ([email protected]) <[email protected]> Subject: [ansible-project] Ansible cli argument from with ansible-play 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 }}" -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/BY2PR0301MB1958AF36C2742B5F5A483DE9DDFB0%40BY2PR0301MB1958.namprd03.prod.outlook.com. For more options, visit https://groups.google.com/d/optout.
