On 18/01/2022 18:52, Parth Patel wrote:
How inventory_hostname would contain domain ?
If you put foo.example.com into the inventory, the inventory_hostname would
include the domain example.com.
Regards
Racke
Its just a special variable pre defined in ansible which contains name of the host for which task or play runs On Tue, 18 Jan 2022 at 10:56 PM, Jason Wood <[email protected] <mailto:[email protected]>> wrote: 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 [email protected] <mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/d0750be4-1afe-4635-885e-8e377ff98d70n%40googlegroups.com <https://groups.google.com/d/msgid/ansible-project/d0750be4-1afe-4635-885e-8e377ff98d70n%40googlegroups.com?utm_medium=email&utm_source=footer>. -- 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] <mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAEMGyL%2B2_ND0gOOHMv%3DyNi8LuXM4%2BU7mX0wRF3UFP5YzU43coA%40mail.gmail.com <https://groups.google.com/d/msgid/ansible-project/CAEMGyL%2B2_ND0gOOHMv%3DyNi8LuXM4%2BU7mX0wRF3UFP5YzU43coA%40mail.gmail.com?utm_medium=email&utm_source=footer>.
-- Ecommerce and Linux consulting + Perl and web application programming. Debian and Sympa administration. -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/aba94d67-426e-7de6-d231-5353eb67be60%40linuxia.de.
OpenPGP_signature
Description: OpenPGP digital signature
