Я просто схожу с ума с плагином ansible для foreman / katello.
https://theforeman.org/plugins/foreman_ansible/1.x/index.html
Я просто установил как описано.
Когда я запускаю ansibl-playbook, я получаю следующую ошибку:
# ansible-playbook /etc/ansible/temp.yml
[WARNING]: SSL verification of https://katello.domain.com disabled
PLAY [test the ansible] **********************************************************************************************************************************************************************
TASK [Gathering Facts] ***********************************************************************************************************************************************************************
ok: [katello.domain.com]
PLAY RECAP ***********************************************************************************************************************************************************************************
katello.domain.com : ok=1 changed=0 unreachable=0 failed=0
[WARNING]: Failure using method (v2_playbook_on_stats) in callback plugin (</usr/lib/python2.7/site-packages/ansible/plugins/callback/foreman.CallbackModule object at 0x2d2b750>): [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:579)
[WARNING]: Failure using method (v2_playbook_on_stats) in callback plugin (</usr/lib/python2.7/site-packages/ansible/plugins/callback/foreman.CallbackModule object at 0x2d82ed0>): [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:579)
Я использую официально подписанный сертификат от comodo.
SSLCertificateFile "/etc/pki/tls/certs/katello.domain.com.crt"
SSLCertificateKeyFile "/etc/pki/tls/private/katello.domain.com.key"
SSLCertificateChainFile "/etc/pki/tls/certs/katello.domain.com-ca.crt"
И моя конфигурация плагина обратного вызова:
FOREMAN_URL = os.getenv('FOREMAN_URL', "https://katello.domain.com")
FOREMAN_SSL_CERT = (os.getenv('FOREMAN_SSL_CERT',
"/etc/pki/tls/certs/katello.domain.com.crt"),
os.getenv('FOREMAN_SSL_KEY',
"/etc/pki/tls/private/katello.domain.com.key"))
FOREMAN_SSL_VERIFY = os.getenv('FOREMAN_SSL_VERIFY', "0")
с уважением
привет ты можешь попробовать это
FOREMAN_URL = os.getenv('FOREMAN_URL', "https://katello.domain.com")
# Substitute by a real SSL certificate and key if your Foreman uses HTTPS FOREMAN_SSL_CERT = (os.getenv('FOREMAN_SSL_CERT', "/etc/foreman/client_cert.pem"),
os.getenv('FOREMAN_SSL_KEY', "/etc/foreman/client_key.pem")) FOREMAN_SSL_VERIFY = os.getenv('FOREMAN_SSL_VERIFY', "1")
/etc/foreman/client_cert.pem и /etc/foreman/client_cert.pem являются сертификатами по умолчанию