Only ever seen that when the play didn't gather facts... Which must be explicitly disabled with 'gather_facts: no' or similar.. Maybe that's somewhere in your playbooks? On 16 Apr 2016 10:01 p.m., "Greg Chavez" <[email protected]> wrote:
> Guy, no, but the next time this happens to you, gather as much information > you can before you run again when, presumably, the playbook with run > without the error. Present as much as the information as you can share > here. > > Thanks > --Greg Chavez > > On Fri, Apr 15, 2016 at 7:20 PM, Guy Knights <[email protected]> > wrote: > >> I have a weird issue where occasionally when I run a playbook that has a >> task which uses the {{ ansible_hostname }} variable in it, I get an >> error "'ansible_hostname' is undefined". In most cases, if I re-run the >> playbook again right after I see the errors, it works fine and I don't see >> these errors. >> >> Does anyone know why this might be happening? >> >> Thanks, >> Guy >> >> -- >> 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/CANNH9msH0Qa79nirc9QHx1qhQp04ibh8h1%3DOMS4Cmz77jubKgA%40mail.gmail.com >> <https://groups.google.com/d/msgid/ansible-project/CANNH9msH0Qa79nirc9QHx1qhQp04ibh8h1%3DOMS4Cmz77jubKgA%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > \*..+.- > --Greg Chavez > +//..;}; > > -- > 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/CAMTcKhay1eR5Z%3D0Vvq1%3DkxUVuz_%2BYvHGUnCq%3DSEiwPpOe77sUw%40mail.gmail.com > <https://groups.google.com/d/msgid/ansible-project/CAMTcKhay1eR5Z%3D0Vvq1%3DkxUVuz_%2BYvHGUnCq%3DSEiwPpOe77sUw%40mail.gmail.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 [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/CACSH3Mt2_yyqsPLm0qPPWcahzPRmX8tHBwSUtB22NKE%2BvZojUA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
