that would be the special var inventory_hostname On 8 October 2014 15:47, Samnang Sen <samnang....@gmail.com> wrote:
> I need to fetch a file from all servers in my inventory file. > > # ansible_hosts.txt > > server1 > server2 > server3 > > # Command I run. I want to substitute <SERVER NAME> with the hostname > within ansible_hosts.txt > ansible all -m fetch -a "src=/tmp/<SERVER NAME>.txt dest=special" > > -- > 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 ansible-project+unsubscr...@googlegroups.com. > To post to this group, send email to ansible-project@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/a5611f7d-a2a6-4906-8c5e-553b9b6959ac%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/a5611f7d-a2a6-4906-8c5e-553b9b6959ac%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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 ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAEhzMJBBF0cEDR6uBce%2BDoa9SZpt27N615Gswq88srh3AvMBZg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.