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

certbot cron installed even if letsencrypt flag is: false #42

Open
sirup opened this issue Feb 24, 2021 · 2 comments
Open

certbot cron installed even if letsencrypt flag is: false #42

sirup opened this issue Feb 24, 2021 · 2 comments

Comments

@sirup
Copy link

sirup commented Feb 24, 2021

There is a missing when statement in tasks/letsencrypt.yml for task:

- name: Insert cert-bot renew in crontab

It is missing when:

when: - item.value.letsencrypt | default(False)

Leads to high CPU usage because the cron job in installed but cannot be used.
Happens when you do not use letsencrypt:

letsencrypt: false

@ivareri
Copy link

ivareri commented Apr 21, 2021

Would it not be better to only include tasks/letsencrypt.yml when letsencrypt is set to true?

Inserting when: item.value.letsencrypt | default(False) after line 193 in main.yml should fix this.

@gthieleb
Copy link

gthieleb commented Dec 20, 2022

Same here with config:

  vars:
    nginx_revproxy_sites:
      default:
        ssl: false
        letsencrypt: false
      prometheus:
        domains:
        - example.com
        upstreams:
        - { backend_address: 127.0.0.1, backend_port: 9090 }
        ssl: false
        letsencrypt: false

TASK [hispanico.nginx_revproxy : Insert cert-bot renew in crontab] **************************************************************************************************************************
fatal: [********]: FAILED! => {"changed": false, "msg": "Failed to find required executable crontab in paths: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"}

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

3 participants