# vim:syntax=yaml --- {%- from "acme/map.jinja" import acme with context %} acmesh-install: cmd.run: - name: "curl https://get.acme.sh | sh" - runas: root - cwd: /root - env: - HOME: /root - unless: /bin/bash -c "[[ -f /root/.acme.sh/acme.sh ]]" acmesh-upgrade: cmd.run: - name: /root/.acme.sh/acme.sh --upgrade - runas: root - cwd: /root - env: - HOME: /root - require: - cmd: acmesh-install acmesh-run: cmd.run: - name: /root/.acme.sh/acme.sh --debug --issue {%- for domain in acme.domains %} -d '{{ domain }}' {% endfor -%} --dns dns_ovh --cert-file '' --fullchain-file '{{ acme.fullcertfile }}' --key-file '{{ acme.keyfile }}' -k {{ acme.keysize }} - env: - OVH_AK: '{{ acme.provider.api.application_key }}' - OVH_AS: '{{ acme.provider.api.application_secret }}' - OVH_CK: '{{ acme.provider.api.consumer_key }}' - HOME: '/root' - success_retcodes: - 0 - 1 - 2 - runas: root - cwd: /root - require: - cmd: acmesh-install