작성
·
707
0
ansible all -m yum -a "name=httpd state=present" 실행 시 60번 에러와 77번 에러가 발생할 수 있습니다.
해당 에러 발생 시 해결방안 공유합니다.
case1) 60에러
[에러메시지]
172.17.0.3 | FAILED! => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/libexec/platform-python"
},
"changed": false,
"msg": "Failed to download metadata for repo 'epel': Cannot prepare internal mirrorlist: Curl error (60): Peer certificate cannot be authenticated with given CA certificates for https://mirrors.fedoraproject.org/metalink?repo=epel-8&arch=x86_64&infra=container&content=centos [SSL certificate problem: self signed certificate in certificate chain]",
"rc": 1,
"results": []
}
[해결방안]
vi /etc/yum.conf
맨 아래에 sslverify=0 추가
case2) 77 에러
[에러메시지]
172.17.0.4 | FAILED! => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/libexec/platform-python"
},
"changed": false,
"msg": "Failed to download metadata for repo 'epel': Cannot prepare internal mirrorlist: Curl error (77): Problem with the SSL CA cert (path? access rights?) for https://mirrors.fedoraproject.org/metalink?repo=epel-8&arch=x86_64&infra=container&content=centos [error setting certificate verify locations:\n CAfile: /etc/pki/tls/certs/ca-bundle.crt\n CApath: none]",
"rc": 1,
"results": []
}
[해결방안]
위에 출력된 CAfile: /etc/pki/tls/certs/ca-bundle.crt 참조하여
rm -rf /etc/pki/tls/certs/ca-bundle.crt
yum reinstall -y ca-certificates
명령어 두개 실행.