【发布时间】:2020-02-24 08:13:02
【问题描述】:
我需要在 Ansible 2.4 中实现 openssl 命令 pkcs12 最新的 Ansible 版本提供了一个名为 openssl_pkcs12 的模块,但是如何在 Ansible 2.4 中实现呢? 到目前为止,我已经尝试将此命令放在 openssl_certificate 的操作中,如下所示:
name: openssl create hostcertificate.key
openssl_certificate:
action: pkcs12
attributes: '"-nocerts" "-nodes"'
src: <path-to-certificate>.p12
path: <destination-path>.key
mode: '400'
state: present
但它会抛出“(openssl_certificate) 模块不支持的参数”错误,因为 openssl_certificate 模块不支持此操作。 我怎样才能为这个版本实现这个?
此外,我需要自动化以下 openssl 命令,因此请检查我在上述 Ansible 脚本中是否犯了任何其他错误:
openssl pkcs12 -nocerts -nodes -out <destination-path>.key -in <path-to-certificate>.p12
提前致谢
【问题讨论】:
标签: linux openssl ansible-2.x