# ansible -m win_ping windows -vvv
/usr/lib64/python2.6/site-packages/cryptography-2.3.1-py2.6-linux-x86_64.egg/cryptography/hazmat/primitives/constant_time.py:26: CryptographyDeprecationWarning: Support for your Python version is deprecated. The next version of cryptography will remove support. Please upgrade to a 2.7.x release that supports hmac.compare_digest as soon as possible.
utils.DeprecatedIn23,
ansible 2.4.2.0
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/home/ldap/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.6/site-packages/ansible
executable location = /usr/bin/ansible
python version = 2.6.6 (r266:84292, Aug 9 2016, 06:11:56) [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)]
Using /etc/ansible/ansible.cfg as config file
Parsed /etc/ansible/hosts inventory source with ini plugin
META: ran handlers
Using module file /usr/lib/python2.6/site-packages/ansible/modules/windows/win_ping.ps1
<xxxxxxxx> ESTABLISH WINRM CONNECTION FOR USER: None on PORT 5986 TO xxxxxxxx
/usr/lib/python2.6/site-packages/pywinrm-0.3.0-py2.6.egg/winrm/transport.py:299: UserWarning: Function <unbound method HTTPKerberosAuth.__init__> does not contain optional arg send_cbt, check installed version with pip list
EXEC (via pipeline wrapper)
xxxxxxxx | SUCCESS => {
"changed": false,
"ping": "pong"
}
META: ran handlers
META: ran handlers
===================================================================================================================
-- Debut execution playbook - winping --
ansible-playbook 2.4.2.0
config file = /tmp/xxxxxxx/configuration/ansible_xxxxxxx.cfg
configured module search path = [u'/home/ldap/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.6/site-packages/ansible
executable location = /usr/bin/ansible-playbook
python version = 2.6.6 (r266:84292, Aug 9 2016, 06:11:56) [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)]
Using /tmp/xxxxxxx/configuration/ansible_xxxxxxx.cfg as config file
Parsed /tmp/xxxxxxx/configuration/hosts_xxxxxxx inventory source with ini plugin
PLAYBOOK: Arret_Relance_Win_bas.yml ***************************************************************************************************************************************************************************
1 plays in Arret_Relance_Win_bas.yml
PLAY [bas.test.winping] ***************************************************************************************************************************************************************************************
META: ran handlers
TASK [Test de win_ping sur [bas.test.winping]] ****************************************************************************************************************************************************************
task path: /tmp/xxxxxxx/Arret_Relance_Win_bas.yml:6
Using module file /usr/lib/python2.6/site-packages/ansible/modules/windows/win_ping.ps1
<xxxxxxxx> ESTABLISH WINRM CONNECTION FOR USER: xxxxxxx on PORT 5986 TO xxxxxxxx
EXEC (via pipeline wrapper)
<xxxxxxxx> PUT "/tmp/tmpbJXmTv" TO "C:\Users\xxxxxxx\AppData\Local\Temp\ansible-tmp-1538038172.34-25609696399970\win_ping.ps1"
EXEC (via pipeline wrapper)
The full traceback is:
Au caract?re Ligne:4 : 3
+ & "C:\Users\xxxxxxx\Ap ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fatal: [ANS_yyyyyyyyy]: FAILED! => {
"changed": false
}
MSG:
Le terme ??C:\Users\xxxxxxx\AppData\Local\Temp\ansible-tmp-1538038172.34-25609696399970\win_ping.ps1.ps1?? n'est pas reconnu comme nom d'applet de commande, fonction, fichier de script ou programme ex?cutable. V?rifiez l'orthographe du nom, ou si un chemin d'acc?s existe, v?rifiez que le chemin d'acc?s est correct et r?essayez.
PLAY RECAP ****************************************************************************************************************************************************************************************************
ANS_yyyyyyyyy : ok=0 changed=0 unreachable=0 failed=1
===================================================================================================================
# ansible-config dump --only-changed
/usr/lib64/python2.6/site-packages/cryptography-2.3.1-py2.6-linux-x86_64.egg/cryptography/hazmat/primitives/constant_time.py:26: CryptographyDeprecationWarning: Support for your Python version is deprecated. The next version of cryptography will remove support. Please upgrade to a 2.7.x release that supports hmac.compare_digest as soon as possible.
utils.DeprecatedIn23,
ANSIBLE_SSH_ARGS(/etc/ansible/ansible.cfg) = -o GSSAPIAuthentication=yes -o UserKnownHostsFile=/home/ldap/.ssh/known_hosts
DEFAULT_BECOME(/etc/ansible/ansible.cfg) = False
DEFAULT_BECOME_ASK_PASS(/etc/ansible/ansible.cfg) = False
DEFAULT_BECOME_METHOD(/etc/ansible/ansible.cfg) = dzdo
DEFAULT_HOST_LIST(/etc/ansible/ansible.cfg) = [u'/etc/ansible/hosts']
DEFAULT_LOCAL_TMP(/etc/ansible/ansible.cfg) = /tmp/xxxxxxx/tmp/ansible-local-50563WcZkEl
DEFAULT_REMOTE_TMP(/etc/ansible/ansible.cfg) = /tmp/$USER/ansible
DEFAULT_SCP_IF_SSH(/etc/ansible/ansible.cfg) = True
HOST_KEY_CHECKING(/etc/ansible/ansible.cfg) = False
RETRY_FILES_ENABLED(/etc/ansible/ansible.cfg) = False
# cat bas.test.winping
ansible_port: 5986
ansible_connection: winrm
ansible_winrm_transport: ntlm
ansible_user: xxxxxxx
ansible_password: ppppppppppp
#ansible_winrm_transport: kerberos
ansible_winrm_server_cert_validation: ignore
I used the NTLM protocol and Kerberos, I have the same error.
Thanks for your aid.