Ich bin neu bei Ansible und ich versuche Windows 2012 R2 von RHEL Centos 7 Knoten zu konfigurieren. Ich kann Verbindung zwischen ihnen mit Winrm Credssp herstellen. Im Folgenden finden Sie /etc/ansible/group_vars/windows.yml DateiAnsible Playbook läuft für lange/unbegrenzt für .exe Installationsaufgabe mit psexec Modul
---
ansible_user: admin
ansible_password: XXXXXXX
ansible_winrm_scheme: https
ansible_winrm_transport: credssp
ansible_port: 5986
ansible_connection: winrm
ansible_winrm_server_cert_validation: ignore
validate_certs: false
in/etc/ansible/hosts-Datei Ich habe Fenster definiert FQDN
[windows]
xx.xx.xx.xx
Wenn ich win_ping Modul zum Testen von Verbindung von execute zentralen Linux-Knoten zu Windows 2012 R2 Server war es erfolgreich.
[[email protected] playbooks]# ansible windows -m win_ping
XX.XX.XX.XX | SUCCESS => {
"changed": false,
"ping": "pong"
}
Aber wenn ich habe versucht Probe .exe (VLC) Datei in der lokalen Laufwerk zu installieren unter Textbuch-Datei, nach ansible-Textbuch playbook.yml Befehl einreichen, wird es kontinuierlich auf unbestimmte Zeit warten, da es nicht ist .exe-Installation abschließen. Hinweis: Der PsExec.exe-Speicherort wird in der PATH-Umgebungsvariablen für Windows aktualisiert.
Unten ist die Konsolenausgabe nach dem Senden des Ansible-Playbook-Befehls für das obige Playbook.
PLAY [Windows ansible playbook] ************************************************
TASK [Gathering Facts] *********************************************************
ok: [192.168.2.14]
TASK [installing VLC] **********************************************************
Unten ist das Protokoll, das ständig dasselbe anzeigt. Wartet ununterbrochen. /var/log/ansible/log
2017-10-27 22:22:32,574 p=4269 u=root | TASK [installing VLC] **********************************************************
2017-10-27 22:22:32,672 requests_credssp.credssp The credentials that will be used in the auth, DOMAIN: '.', USER: 'admin'
2017-10-27 22:22:32,675 requests.packages.urllib3.connectionpool Starting new HTTPS connection (1): 192.168.2.14
2017-10-27 22:22:32,712 requests.packages.urllib3.connectionpool "POST /wsman HTTP/1.1" 401 0
2017-10-27 22:22:32,714 requests_credssp.credssp _start_tls_handshake(): Starting TLS handshake with server
2017-10-27 22:22:32,715 requests.packages.urllib3.connectionpool Resetting dropped connection: 192.168.2.14
2017-10-27 22:22:32,771 requests.packages.urllib3.connectionpool "POST /wsman HTTP/1.1" 401 0
2017-10-27 22:22:32,774 requests.packages.urllib3.connectionpool "POST /wsman HTTP/1.1" 401 0
2017-10-27 22:22:32,775 requests_credssp.credssp _start_tls_handshake(): Handshake complete. Protocol: TLSv1.2, Cipher: ECDHE-RSA-AES256-GCM-SHA384
2017-10-27 22:22:32,775 requests_credssp.credssp _get_authentication_token(): creating NTLM negotiate token and add it to the initial TSRequest
2017-10-27 22:22:32,776 requests_credssp.credssp _get_authentication_token(): NTLM Negotiate Token: TlRMTVNTUAABAAAAMpCI4gEAAQAoAAAAAAAAACkAAAAGAbEdAAAADy4=
2017-10-27 22:22:32,776 requests_credssp.credssp _get_authentication_token(): get NTLM challenge token from the server and add it to the ntlm context
2017-10-27 22:22:32,777 requests.packages.urllib3.connectionpool "POST /wsman HTTP/1.1" 401 0
2017-10-27 22:22:32,779 requests_credssp.credssp _get_authentication_token(): NTLM Challenge Token: TlRMTVNTUAACAAAADwAPADgAAAA2goriAQ4M49EAIqMAAAAAAAAAAJgAmABHAAAACgBaKQAAAA9ERVNLVE9QLUVETEFLRzQCAB4ARABFAFMASwBUAE8AUAAtAEUARABMAEEASwBHADQAAQAeAEQARQBTAEsAVABPAFAALQBFAEQATABBAEsARwA0AAQAHgBEAEUAUwBLAFQATwBQAC0ARQBEAEwAQQBLAEcANAADAB4ARABFAFMASwBUAE8AUAAtAEUARABMAEEASwBHADQABwAIAGOmEf9DT9MBAAAAAA==
2017-10-27 22:22:32,779 requests_credssp.credssp _get_authentication_token(): create NTLM authentication token
2017-10-27 22:22:32,782 requests_credssp.credssp _send_auth_response(): Generate the encrypted public key data and add it to the TSRequest
2017-10-27 22:22:32,783 requests_credssp.credssp _send_auth_response(): Send TSRequest structure containing the final auth token and public key info
2017-10-27 22:22:32,783 requests_credssp.credssp _send_auth_response(): Get the public key structure response from the server
2017-10-27 22:22:32,786 requests.packages.urllib3.connectionpool "POST /wsman HTTP/1.1" 401 0
2017-10-27 22:22:32,786 requests.packages.urllib3.connectionpool "POST /wsman HTTP/1.1" 401 0
2017-10-27 22:22:32,787 requests_credssp.credssp _verify_public_keys(): Get raw public key from the server and decrypt it for verification
2017-10-27 22:22:32,788 requests_credssp.credssp _verify_public_keys(): verification of the server's public key is successful
2017-10-27 22:22:32,788 requests_credssp.credssp _send_encrypted_credentials(): Sending the encrypted credentials to the server
2017-10-27 22:22:32,822 requests.packages.urllib3.connectionpool "POST /wsman HTTP/1.1" 200 1636
2017-10-27 22:22:32,832 requests.packages.urllib3.connectionpool "POST /wsman HTTP/1.1" 200 847
2017-10-27 22:22:33,116 requests.packages.urllib3.connectionpool "POST /wsman HTTP/1.1" 200 753
2017-10-27 22:22:33,889 requests.packages.urllib3.connectionpool "POST /wsman HTTP/1.1" 200 998
2017-10-27 22:22:53,934 requests.packages.urllib3.connectionpool "POST /wsman HTTP/1.1" 500 1320
2017-10-27 22:23:13,978 requests.packages.urllib3.connectionpool "POST /wsman HTTP/1.1" 500 1320
2017-10-27 22:23:34,024 requests.packages.urllib3.connectionpool "POST /wsman HTTP/1.1" 500 1320
2017-10-27 22:23:54,069 requests.packages.urllib3.connectionpool "POST /wsman HTTP/1.1" 500 1320
2017-10-27 22:24:14,114 requests.packages.urllib3.connectionpool "POST /wsman HTTP/1.1" 500 1320
oben log weiter/updates gleiche gilt für alle 20 Sek. Diese .exe-Installation wurde nie abgeschlossen.
2017-10-27 22:24:14,114 requests.packages.urllib3.connectionpool "POST /wsman HTTP/1.1" 500 1320
Bitte schlagen Sie vor, welche Änderung/Aktualisierung ich auf Windows-Seite tun muss, damit .exe Dateiinstallation abgeschlossen sein sollte.