Re: [ansible-project] Help with acme_certificate / letsencrypt and empty challenge_data

2022-01-19 Thread Jason Wood
Thanks - I'm understanding much better now. The presence of challenge data is not necessarily required for certificate renewal, if previous challenge data is still valid, you can just skip the copy step and the second run will install a new certificate. If no certificate is needed because

Re: [ansible-project] Help with acme_certificate / letsencrypt and empty challenge_data

2022-01-18 Thread 'Felix Fontein' via Ansible Project
Hi, > It appears that the first example in the docs has this error: > https://docs.ansible.com/ansible/latest/collections/community/crypto/acme_certificate_module.html#acme-certificate-module oh, indeed! Thanks for spotting that! I've created a PR to fix it

Re: [ansible-project] Help with acme_certificate / letsencrypt and empty challenge_data

2022-01-18 Thread Jason Wood
oh my! Thank you!!! It appears that the first example in the docs has this error: https://docs.ansible.com/ansible/latest/collections/community/crypto/acme_certificate_module.html#acme-certificate-module So with that solved, I'm left with the problem where challenge_data is empty even if I

Re: [ansible-project] Help with acme_certificate / letsencrypt and empty challenge_data

2022-01-18 Thread 'Felix Fontein' via Ansible Project
Hi, > But right after that, I have the exact same statement in when: > > - name: "Implement http-01 challenge files" > copy: > content: "{{ > acme_challenge_mydomain['challenge_data'][inventory_hostname]['http-01']['resource_value'] > > }}" > dest: "/opt/FileMaker/FileMaker

Re: [ansible-project] Help with acme_certificate / letsencrypt and empty challenge_data

2022-01-18 Thread Jason Wood
I added these debugs: - name: Debug when statement debug: var: acme_challenge_mydomain is changed and inventory_hostname in acme_challenge_mydomain['challenge_data'] - name: Debug the debug debug: var: acme_challenge_mydomain is changed and inventory_hostname in

Re: [ansible-project] Help with acme_certificate / letsencrypt and empty challenge_data

2022-01-18 Thread Stefan Hornburg (Racke)
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

Re: [ansible-project] Help with acme_certificate / letsencrypt and empty challenge_data

2022-01-18 Thread Parth Patel
How inventory_hostname would contain domain ? 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 wrote: > inventory_hostname is not the domain, it is a variable which contains the > domain.

Re: [ansible-project] Help with acme_certificate / letsencrypt and empty challenge_data

2022-01-18 Thread Jason Wood
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

Re: [ansible-project] Help with acme_certificate / letsencrypt and empty challenge_data

2022-01-18 Thread 'Felix Fontein' via Ansible Project
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

[ansible-project] Help with acme_certificate / letsencrypt and empty challenge_data

2022-01-18 Thread Jason Wood
I'm fairly new to this. I'm using ansible 2.9.6 on Ubuntu 20.04. I followed the Digital Ocean tutorial to get started with letsencrypt/acme_certificate The problem I run