Page MenuHomeDevCentral

letsencrypt_renew_enable state fails on Eglide
Closed, ResolvedPublic

Description

The letsencrypt_renew_enable state returns:
Unable to trigger watch for service.enabled

Event Timeline

dereckson claimed this task.

Did a run this night to update Certbot files, states are currently correct:

Eglide
$ sudo salt-call --local state.apply roles/core/certificates/letsencrypt
local:                           
----------                                                                                                
          ID: letsencrypt_software            
    Function: pkg.installed                                                                               
        Name: certbot                                                                                     
      Result: True                                                                                        
     Comment: All specified packages are already installed                                                                                                                                                           
     Started: 00:04:00.155939                                                                                                                                                                                        
    Duration: 60.96 ms                                                                                                                                                                                               
     Changes:                                                                                             
----------                             
          ID: /var/letsencrypt-auto                                                                       
    Function: file.directory        
      Result: True                                                                                        
     Comment: The directory /var/letsencrypt-auto is in the correct state                                 
     Started: 00:04:00.218760           
    Duration: 0.992 ms                                                                                    
     Changes:                                                                                             
----------                                                                                                
          ID: /etc/letsencrypt/cli.ini
    Function: file.managed                  
      Result: True        
     Comment: File /etc/letsencrypt/cli.ini updated
     Started: 00:04:00.219833                                                                             
    Duration: 4.807 ms       
     Changes:          
              ----------                         
              diff:                                                                                                                                                                                                  
                  --- 
                  +++ 
                  @@ -3,7 +3,7 @@
                   #   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                   #   Project:        Nasqueron
                   #   License:        Trivial work, not eligible to copyright
                  -#   Source file:    roles/core/certificates/files/cli.ini
                  +#   Source file:    roles/core/certificates/files/certbot/cli.ini
                   #   -------------------------------------------------------------
                   #
                   #   <auto-generated>
----------
          ID: /usr/bin/check-letsencrypt-certificates
    Function: file.managed
      Result: True
     Comment: File /usr/bin/check-letsencrypt-certificates updated
     Started: 00:04:00.224760
    Duration: 4.615 ms
     Changes:   
              ----------                                                                                                                                                                                             
              diff:                                                                                                                                                                                                  
                  --- 
                  +++ 
                  @@ -8,8 +8,15 @@
                   #                   for the mapping directory webserver for each
                   #                   certificate to renew. HTTP only.
                   #   License:        BSD-2-Clause
                  -#   Source file:    roles/core/certificates/files/check-letsencrypt-certificates.py
                  +#   Source file:    roles/core/certificates/files/certbot/utilities/check-letsencrypt-certificates.py
                   #   -------------------------------------------------------------
                  +#
                  +#   <auto-generated>
                  +#       This file is managed by our rOPS SaltStack repository.
                  +#
                  +#       Changes to this file may cause incorrect behavior
                  +#       and will be lost if the state is redeployed.
                  +#   </auto-generated>
                   
                   #   -------------------------------------------------------------
                   #   Table of contents
----------
          ID: /etc/letsencrypt/acme-dns-auth
    Function: file.managed
      Result: True
     Comment: File /etc/letsencrypt/acme-dns-auth updated
     Started: 00:04:00.229511
    Duration: 6.331 ms
     Changes:   
              ----------
              diff:
                  --- 
                  +++ 
                  @@ -5,7 +5,7 @@
                   #   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                   #   Author:         Joona Hoikkala
                   #   License:        MIT
                  -#   Source file:    roles/core/certificates/files/acme-dns-auth.py
                  +#   Source file:    roles/core/certificates/files/certbot/acme-dns/acme-dns-auth.py
                   #   -------------------------------------------------------------
                   #
                   #   <auto-generated>
----------
          ID: /usr/bin/edit-acme-dns-accounts                                                                                                                                                                        
    Function: file.managed                                                                                                                                                                                           
      Result: True                                                                                                                                                                                                   
     Comment: File /usr/bin/edit-acme-dns-accounts updated                                                                                                                                                           
     Started: 00:04:00.235993
    Duration: 6.567 ms
     Changes:   
              ----------
              diff:
                  --- 
                  +++ 
                  @@ -7,7 +7,7 @@
                   #   Description:    Edit acmedns.json to import credentials
                   #                   for a specific subdomain to verify.
                   #   License:        BSD-2-Clause
                  -#   Source file:    roles/core/certificates/files/edit-acme-dns-accounts.py
                  +#   Source file:    roles/core/certificates/files/certbot/acme-dns/edit-acme-dns-accounts.py
                   #   -------------------------------------------------------------
                   #
                   #   <auto-generated>
----------
          ID: /usr/bin/delete-certbot-certificate
    Function: file.managed
      Result: True
     Comment: File /usr/bin/delete-certbot-certificate updated
     Started: 00:04:00.242700
    Duration: 5.555 ms
     Changes:   
              ----------
              diff:
                  New file
              mode:
                  0755
----------
          ID: /usr/local/sbin/letsencrypt-renewal
    Function: file.managed
      Result: True
     Comment: File /usr/local/sbin/letsencrypt-renewal updated
     Started: 00:04:00.248406
    Duration: 5.193 ms
     Changes:   
              ----------
              diff:
                  --- 
                  +++ 
                  @@ -5,7 +5,7 @@
                   #   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                   #   Project:        Nasqueron
                   #   License:        Trivial work, not eligible to copyright
                  -#   Source file:    roles/core/certificates/files/letsencrypt-renewal.sh
                  +#   Source file:    roles/core/certificates/files/certbot/renewal/standard.sh
                   #   -------------------------------------------------------------
                   #
                   #   <auto-generated>
                  @@ -16,14 +16,14 @@
                   #   </auto-generated>
                   
                   nginx_test() {
                  -     nginx_output="$(nginx -t 2>&1)"
                  -     nginx_return_code="$?"
                  +    nginx_output="$(nginx -t 2>&1)"
                  +    nginx_return_code="$?"
                   
                  -     if [ "$nginx_return_code" -eq 0 ] && [ -n "$(echo "${nginx_output}" | grep warn)" ]; then
                  -             return 2;
                  -     else
                  -             return "$nginx_return_code";
                  -     fi;
                  +    if [ "$nginx_return_code" -eq 0 ] && echo "${nginx_output}" | grep warn >&2; then
                  +        return 2;
                  +    else
                  +        return "$nginx_return_code";
                  +    fi;
                   }
                   
                   certbot renew && nginx_test && nginx -s reload

Summary for local
------------
Succeeded: 8 (changed=6)
Failed:    0
------------
Total states run:     8
Total run time:  95.020 ms