Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

letsencrypt_opt_test_cert is undefined #88

Open
107142 opened this issue Jan 3, 2024 · 0 comments
Open

letsencrypt_opt_test_cert is undefined #88

107142 opened this issue Jan 3, 2024 · 0 comments

Comments

@107142
Copy link

107142 commented Jan 3, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant