certbot_nginx icon indicating copy to clipboard operation
certbot_nginx copied to clipboard

The task includes an option with an undefined variable. The error was: 'domains' is undefined.

Open favour121 opened this issue 1 year ago • 1 comments

TASK [coopdevs.certbot_nginx : Compare domains with domains in certificate] ************************************************************************** fatal: [server-name]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'domains' is undefined. 'domains' is undefined\n\nThe error appears to be in '/home/user/.ansible/roles/coopdevs.certbot_nginx/tasks/certificate.yml': line 29, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Compare domains with domains in certificate\n ^ here\n"}

Offending task code:

- name: Compare domains with domains in certificate
  set_fact:
    certbot_force_update: "{{ old_domains | symmetric_difference(domains) | length | bool }}"
  when: certbot_force_update is not defined

favour121 avatar Dec 07 '23 23:12 favour121