inventory_hostname is not the domain, it is a variable which contains the 
domain. That's the part where I'm not sure how to reference it.

I will try upgrading to see if that changes anything. Thanks!

On Tuesday, January 18, 2022 at 12:03:31 p.m. UTC-5 Felix Fontein wrote:

> Hi,
>
> > I'm fairly new to this. I'm using ansible 2.9.6 on Ubuntu 20.04.
>
> that version is really old and outdated. You should upgrade at least to
> the latest 2.9.x release (2.9.27), or even to the latest Ansible
> release (5.2.0).
>
> This is the correct syntax (assuming your domain name is
> inventory_hostname):
>
> > when: acme_challenge_mydomain is changed and inventory_hostname in 
> > acme_challenge_mydomain['challenge_data']
>
> Without knowing your playbook...
>
> > but in both cases the task executes even though I can see with a
> > debug task that challenge_data is empty:
> > ..."challenge_data": {},...
>
> ...it's hard to say why this happens.
>
> Same for this:
>
> > My second question is... I have remaining_days set to 91, and there
> > are 89 days left, so shouldn't I have data in challenge_data?
>
> There should be. (You can also set `force: true` to force regeneration.)
>
> Are you sure that you are really running the playbook that you
> modified, and not something else?
>
> Cheers,
> Felix
>
>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/d0750be4-1afe-4635-885e-8e377ff98d70n%40googlegroups.com.

Reply via email to