-1

我尝试使用 acme_certificate 模块在我的服务器上生成证书

我将它与下一个参数一起使用:

- name: "Generate a Let's Encrypt account key"
  shell: "openssl genrsa 4096 | sudo tee /etc/letsencrypt/account.key"

- name: "install acme"
  acme_certificate:
    acme_version: 2
    challenge: http-01
    terms_agreed: 1
    csr: "/etc/letsencrypt/csrs/{{ domain_name }}.csr"
    account_key_content: "/etc/letsencrypt/account.key"
    fullchain_dest: "/etc/letsencrypt/certs/fullchain_{{ domain_name }}.crt"
    acme_directory: https://acme-v02.api.letsencrypt.org/directory 
    account_email: "/etc/letsencrypt/account.key""
  become: yes

但是当我执行剧本时,我看到了下一个

失败的!=> {"changed": false, "msg": "error while parsing account key: error while loading key: could not unserialize key data.", "other": {}}

为什么会这样?

4

1 回答 1

0

我注意到我使用了错误的参数我应该使用account_key_src而不是account_key_content

于 2020-07-17T06:00:36.610 回答