Skip to content
Snippets Groups Projects
Verified Commit e7668df5 authored by David Mehren's avatar David Mehren
Browse files

Use correct path when checking if the certificate already exists.

parent 3bc42168
No related branches found
No related tags found
No related merge requests found
---
- name: "<{{item | regex_replace('/var/lib/acme/live/(.*)/haproxy', '\\1')}}> Gather Cert stats"
- name: "<{{ item }}> Gather Cert stats"
stat:
path: "{{ item }}"
path: "/var/lib/acme/live/{{ item }}/haproxy"
register: cert
- name: "<{{item | regex_replace('/var/lib/acme/live/(.*)/haproxy', '\\1')}}> Run acmetool (Make sure your system is accessible from the internet!)"
shell: "acmetool want --batch {{item | regex_replace('/var/lib/acme/live/(.*)/haproxy', '\\1') }}"
- name: "<{{ item }}> Run acmetool (Make sure your system is accessible from the internet!)"
shell: "acmetool want --batch {{ item }}"
register: result
changed_when: "result.stdout"
when: not cert.stat.exists
notify: restart haproxy
tags:
- skip_ansible_lint
\ No newline at end of file
- skip_ansible_lint
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment