使用Ansible在CentOS上安装Cassadra-证书错误

时间:2019-07-16 10:20:14

标签: ssl cassandra ansible centos key

我正在尝试使用Ansible在CentOS 7上安装Cassandra。我在/etc/yum.repos.d中创建了一个cassandra.repo,当我从主机运行yum时,它可以工作,但是当我运行该剧本时,它却无法正常工作。

这是我玩的一部分:

- name: Add Cassandra to yum repo
  yum_repository:
    name: cassandra
    description: Apache Cassandra
    baseurl: https://www.apache.org/dist/cassandra/redhat/30x/
- rpm_key:
    state: present
    key: 'https://www.apache.org/dist/cassandra/KEYS'
- name: Install Cassandra
  yum:
    name: cassandra
    state: present

这是错误:

FAILED! => {"changed": false, "msg": "Failed to validate the SSL certificate 
for www.apache.org:443. Make sure your managed systems have a valid CA 
certificate installed. You can use validate_certs=False if you do not need to 
confirm the servers identity but this is unsafe and not recommended. Paths 
checked for this platform: /etc/ssl/certs, /etc/pki/ca-trust/extracted/pem, 
/etc/pki/tls/certs, /usr/share/ca-certificates/cacert.org, /etc/ansible. The 
exception msg was: EOF occurred in violation of protocol (_ssl.c:618)."}

我不知道该怎么做才能验证密钥。

0 个答案:

没有答案