Skip to content

letsencrypt_opt_test_cert is undefined #88

@107142

Description

@107142

Found a minor issue when the acme account is not created. The playbook fails at task Create new Let's Encrypt account.

fatal: [sub.example.org]: FAILED! =>
  msg: |-
    The task includes an option with an undefined variable. The error was: 'letsencrypt_opt_test_cert' is undefined. 'letsencrypt_opt_test_cert' is undefined

    The error appears to be in '/home/user/linux-maintenance/roles/ansible-role-letsencrypt/tasks/account.yml': line 54, column 5, but may
    be elsewhere in the file depending on the exact syntax problem.

    The offending line appears to be:


      - name: Create new Let's Encrypt account
        ^ here

Looking at the code it seems the issue stems from 'letsencrypt_opt_test_cert' gets defined in certificate.yml but the var is used earlier in account.yml beforce being properly defined.

The easiest solution seems to be simply moving the set_fact that defines the var into account.yml.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions