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 timer is enabled even when install_units pillar is False #23

Open
rsuarezsoto opened this issue Jul 26, 2018 · 0 comments
Open

Comments

@rsuarezsoto
Copy link

Hi,

I have these pillars for Let's Encrypt configuration:

letsencrypt:
  client:
    email: [email protected]
    auth:
      method: webroot
      path: /var/www/html
      port: 80
    source:
      engine: pkg
      cli: /usr/bin/certbot
      install_units: False

But when I apply the letsencrypt.client state (hoping to just install the packages), I get this error:

          ID: certbot_timer_enabled
    Function: service.running
        Name: certbot.timer
      Result: False
     Comment: The named service certbot.timer is not available
     Started: 13:12:14.879614
    Duration: 13.514 ms
     Changes:   

In the file letsencrypt/client/init.sls, the state certbot_timer_enabled is outside the "if" that checks for the existence of the install_units pillar, and gets evaluated every time; but certbot_service is not created unless install_units is true, and that brings up this error.

This patch fixes it:

--- init.sls	2018-07-24 12:57:59.770478847 +0200
+++ init.sls.new	2018-07-26 13:15:23.261438307 +0200
@@ -87,7 +87,6 @@
       - file: certbot_service
     - watch_in:
       - service: certbot_timer_enabled
-{%- endif %}
 
 certbot_timer_enabled:
   service.running:
@@ -95,6 +94,7 @@
     - enable: true
     - require:
       - cmd: certbot_installed
+{%- endif %}
 
 {%- else %}

Please, review the issue at your leisure and consider applying this patch. Thanks in advance!

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