Skip to content

Can't use webroot as challenge type #15

@panki27

Description

@panki27

Hi,

I'm not able to use the example:

    - name: "Trigger invocation of the foundata.acmesh.run role"
      ansible.builtin.include_role:
        name: "foundata.acmesh.run"
      vars:
        run_acmesh_autoupgrade: true
        run_acmesh_cfg_accountemail: "hostmaster@example.org"
        run_acmesh_certs:
          - domains:
              - name: "example.org"
                challenge:  # parameters depend on type
                  type: "webroot"
                  webroot: "/var/www/example.org"
            install:
              ca_file: "/etc/pki/tls/certs/example.org/ca.cer"
              cert_file: "/etc/pki/tls/certs/example.org/cert.cer"
              fullcain_file: "/etc/pki/tls/certs/example.org/fullchain.cer"
              key_file: "/etc/pki/tls/certs/example.org/cert.key"
              reloadcmd: "/bin/systemctl reload apache2.service"
            server: "letsencrypt_test"

Running this in a playbook against a server errors out:

[ERROR]: Task failed: Action failed: Validation of arguments failed:
run_acmesh_certs.domains.challenge.webroot. Supported parameters include: challenge_alias, dns_provider, domain_alias, httpport, tlsport, type.
Origin: <unknown>

The documentation appears to be wrong: it states that the domain_alias parameter should be used to set the webroot?

###### `run_acmesh_certs['domains']['challenge']['domain_alias']`<a id="variable-run_acmesh_certs-sub-domains-sub-challenge-sub-domain_alias"></a>

Replacing webroot: with domain_alias: makes it pass the parameter check, but crashes the actual acme.sh call because the wrong (and missing) parameters are supplied.

Metadata

Metadata

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions