通过ansible创建SSL密钥的问题

时间:2019-04-30 08:21:03

标签: ssl openssl ansible

请帮助了解为什么此任务对我不起作用?

---
- name: Generation of SSL key
  openssl_privatekey:
    path: "/opt/mongodbkey"
    size: 741
    force: true

我的错误:

ERROR! no action detected in task. This often indicates a misspelled module name, or incorrect module path.

The error appears to have been in '/root/mongodb/roles/mongodb/tasks/ssl.yml': line 2, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

---
- name: Generation of SSL key
  ^ here

还有一个快速问题。此手动命令正确的方法吗?

openssl rand -base64 741 > /opt/mongodbkey

0 个答案:

没有答案