I found the cause of the error, trying to run this command "enable-
psremoting" :
PS C:\Users\Administrateur> enable-psremoting
Configuration rapide du service WinRM (Gestion à distance de Windows)
La commande « Set-WSManQuickConfig » s'exécute pour activer l'administration
à distance de cet ordinateur via le
service Gestion à distance de Windows.
Cela inclut :
1. le démarrage ou redémarrage (s'il est déjà démarré) du service
Gestion à distance de Windows ;
2. l'activation du démarrage automatique du service WinRM ;
3. la création d'un écouteur pour accepter les demandes sur n'importe
quelle adresse IP ;
4. l'activation des exceptions de règles de pare-feu Windows pour le
trafic du service Gestion des services Web
(trafic HTTP uniquement).
Voulez-vous continuer ?
[O] Oui [T] Oui pour tout [N] Non [U] Non pour tout [S] Suspendre [?]
Aide (la valeur par défaut est « O ») : O
WinRM est déjà configuré pour recevoir des demandes sur cet ordinateur.
Set-WSManQuickConfig : <f:WSManFault xmlns:f="
http://schemas.microsoft.com/wbem/wsman/1/wsmanfault" Code="2150859113"
Machine="localhost"><f:
Message><f:ProviderFault provider="Config provider"
path="%systemroot%\system32\WsmSvc.dll"><f:WSManFault xmlns:f="
http://schemas.microsoft.com/wbem/wsman/1/wsmanfault"
Code="2150859113" Machine="PC-slim-BH.sifast.infra"><f:Message>
*L'exception de pare-feu WinRM ne fonctionnera pas carl'un des types de
connexion réseau de cet ordinateur est défini à Public. Changez le type de
connexion réseau enDomaine ou Privé, puis recommencez.*
*(translation: The exception WinRM firewall will not work because one of
the types of network connections of this computer is set to Public. Change
the type of network connection Domain or Private, and then try again)*
</f:Message></f:WSManFault></f:ProviderFault></f:Message></f:WSManFault>
Au caractère Ligne:69 : 17
+ Set-WSManQuickConfig -force
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation : (:)
[Set-WSManQuickConfig], InvalidOperationException
+ FullyQualifiedErrorId :
WsManError,Microsoft.WSMan.Management.SetWSManQuickConfigCommand
As shown in the error The firewall exception WinRM will not work because
one of the types of network connections of thoses computers is set to
Public. I due Change the type of network connection Private. I followed the
steps
in the following link (sorry it's in French) :
http://www.silogix.fr/changer-l%E2%80%99emplacement-r%C3%A9seau-dune-carte-dans-le-centre-r%C3%A9seau-et-partage.aspx
But the error remains in one pc despite the change I made, but in trying to
comment out line 135 (
https://github.com/ansible/ansible/blob/devel/examples/scripts/ConfigureRemotingForAnsible.ps1#L135
<https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fansible%2Fansible%2Fblob%2Fdevel%2Fexamples%2Fscripts%2FConfigureRemotingForAnsible.ps1%23L135&sa=D&sntz=1&usg=AFQjCNGYBVDCHzRMha8BLCLpd_hJt4gyVw>)
as you told me Chris Church, it's work for me :D
thank youuu :) Chris Church
Le mardi 9 décembre 2014 12:44:40 UTC+1, youmarva a écrit :
>
> I want to exécute in a windows 7 machine to allow connexion with Ansible.
>
> In some Machines I have this error when executing
> ConfigureRemotingForAnsible.ps1 (as admin) :
>
> PS C:\Users\adminsifast\Documents\Ansible>
> .\ConfigureRemotingForAnsible.ps1
>
> WinRM has been updated to receive requests.
> The type of the WinRM service was successfully modified.
>
>
> *or (**WinRM is already configured to receive this request**)*
>
> C:\Users\adminsifast\Documents\Ansible\ConfigureRemotingForAnsible.ps1 :
> Could not establish session on either HTTP or
> HTTPS. Breaking
> Au caractère Ligne:1 : 1
> + .\ConfigureRemotingForAnsible.ps1
> + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
> + FullyQualifiedErrorId :
> Microsoft.PowerShell.Commands.WriteErrorException,ConfigureRemotingForAnsible.ps1
>
>
> I searched this error but I have not find a solution to it.
> for some pc when I execute ConfigureRemotingForAnsible.ps1 I have no
> problem but on the other the proplem persists.
>
> if you have an idea thank you to orient me, I really need a solution to
> communicate with Ansible.
>
> thank you
>
>
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/2da49830-cf12-405e-a72f-79b15944b7a2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.