Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
elearning:workbooks:debian:6:avance:l130:part5 [2020/05/27 17:03] adminelearning:workbooks:debian:6:avance:l130:part5 [2023/01/20 07:28] (Version actuelle) admin
Ligne 1: Ligne 1:
 ~~PDF:LANDSCAPE~~ ~~PDF:LANDSCAPE~~
  
-Version **2020.01**+Version **2022.01**
  
 Dernière mise-à-jour : ~~LASTMOD~~ Dernière mise-à-jour : ~~LASTMOD~~
  
-======DOF505 Utilisation d'Ansible avec Windows======+======LCF805 Automatiser l'Administration Système de CentOS 7======
  
 =====Contenu du Module===== =====Contenu du Module=====
  
-  * **DOF505 Utilisation d'Ansible avec Windows** +  * **LCF805 Automatiser l'Administration Système de CentOS 7** 
-    * Pré-requis Windows +    * Contenu du Module 
-    * LAB #14 Préparer Windows 10 +    * LAB #Automatiser avec Ansible 
-      * Mettre à Jour PowerShell et .NET +      * 1.1 - Instructions 
-      * Configurer WinRM +      * 1.2 - Corrigés 
-      Consulter les Informations sur WinRM +        Erreur #1 
-      Créer un Utilisateur Local pour Ansible +        Erreur #2 
-    LAB #15 - Préparer le Contrôleur Ansible +        Erreur #3 
-      Installer pywinrm +        Erreurs 4, 5 et 6
-      * Tester la Configuration +
-    * LAB #16 - Travailler avec Ansible et Windows +
-      * Obtenir les Informations sur Windows10 +
-      * Exécuter une Commande +
-      * Exécuter un script PowerShell +
-      * Installer un Logiciel avec Chocolatey +
-      * Créer un Utilisateur Local+
  
-=====Pré-requis Windows=====+=====LAB #1 Automatiser avec Ansible=====
  
-Ansible est capable de travailler avec les versions de Windows(tm) suivantes :+Connectez-vous à la machine virtuelle **CentOS_7** :
  
-  * Windows(tm) 7,  +<code> 
-  * Windows(tm) 8.1,  +trainee@traineeXX:~$ ssh -l trainee centos7 
-  * Windowst(tm) 10, +</code>
-  * Windows(tm) Server 2008,  +
-  * Windows(tm) 2008 R2,  +
-  * Wondows(tm) 2012,  +
-  * Windows(tm) 2012 R2,  +
-  * Windows(tm) 2016,  +
-  * Windows(tm) 2019.+
  
-Ansible nécessite sur chaque hôte :+====1.1 - Instructions ====
  
-  * PowerShell 3.0 ou supérieur +Il vous est demandé d'automatiser avec Ansible :
-  * Au moins .NET 4.0.+
  
-====Arrêter les Machines Virtuelles non Indisponsables====+  * l'installation du serveur vsftpd, 
 +  * la mise à jour éventuelle de firewalld, 
 +  * la création d'une règle dans firewalld pour le trafic vers le serveur vsfptd, 
 +  * la création sécurisée de deux comptes ftp : 
 +    * user : mike 
 +      * mot de passe : toto 
 +    * user : bob 
 +      * mot de passe : tata
  
-===Formations en FFP=== +Installez donc Ansible à partir des dépôts :
- +
-Utilisez l'interface graphique de VirtualBox et arrêtez les machines virtuelles **TargetA**, **TargetB**, **Web01**, **Web02**, **Web03** et **Web04**. +
- +
-Restaurez ensuite les machines virtuelles **TargetA**, **TargetB**, **Web01**, **Web02**, **Web03** et **Web04** vers leurs états d'origine en revenant à **snapshot1**. +
- +
-===Formations en FAD=== +
- +
-Utilisez les commandes suivantes pour arrêter les machines virtuelles **TargetA**, **TargetB**, **Web01**, **Web02**, **Web03** et **Web04** :+
  
 <code> <code>
-trainee@ansible:~$ exit +[trainee@centos7 ~]su - 
-déconnexion +Mot de passe fenestros 
-Connection to localhost closed. +Dernière connexion jeudi 5 septembre 2019 à 18:28:51 CEST sur pts/
-desktop@server16:~$ VBoxManage controlvm TargetA poweroff +[root@centos7 ~]# yum install epel-release 
-0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% +[root@centos7 ~]# yum install ansible
-desktop@server16:~$ VBoxManage controlvm TargetB poweroff +
-0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% +
-desktop@server16:~$ VBoxManage controlvm Web01 poweroff +
-0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% +
-desktop@server16:~$ VBoxManage controlvm Web02 poweroff +
-0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% +
-desktop@server16:~$ VBoxManage controlvm Web03 poweroff +
-0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% +
-desktop@server16:~$ VBoxManage controlvm Web04 poweroff +
-0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%+
 </code> </code>
  
-Restaurez l'état d'origine des machines virtuelles :+Vérifiez ensuite la présence des exécutables :
  
 <code> <code>
-desktop@server16:~$ VBoxManage snapshot TargetA restorecurrent  +[root@centos7 ~]# which ansible 
-Restoring snapshot 'snapshot1' (6f8ddad7-39d5-4dd5-9dd2-42037445bab3) +/bin/ansible 
-0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% +[root@centos7 ~]# which ansible-playbook 
-desktop@server16:~$ VBoxManage snapshot TargetB restorecurrent  +/bin/ansible-playbook
-Restoring snapshot 'snapshot1' (418bbd10-72e0-4bd7-88f6-8f5e665c6149) +
-0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% +
-desktop@server16:~$ VBoxManage snapshot Web01 restorecurrent  +
-Restoring snapshot 'snapshot1' (c7b39871-8472-4969-8080-9fd1b338a419) +
-0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% +
-desktop@server16:~$ VBoxManage snapshot Web02 restorecurrent  +
-Restoring snapshot 'snapshot1' (752d3b31-5758-4b24-8d66-b0203f493120) +
-0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% +
-desktop@server16:~$ VBoxManage snapshot Web03 restorecurrent  +
-Restoring snapshot 'snapshot1' (b428b30c-54a7-4fd2-9ca7-180779685a88) +
-0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% +
-desktop@server16:~$ VBoxManage snapshot Web04 restorecurrent  +
-Restoring snapshot 'snapshot1' (840c0972-40a0-4339-8ae3-0e36c061fb5b) +
-0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%+
 </code> </code>
  
-Reconnectez-vous à la machine virtuelle **Ansible** :+Afin de vous aider, on vous fournit deux fichiers :
  
 <code> <code>
-desktop@server16:~$ ssh -l trainee localhost -p 2222 +[root@centos7 ~]# cat vsftpd.yml 
-trainee@localhost's password:  +--- 
-Linux ansible.i2tch.loc 4.9.0-8-amd64 #1 SMP Debian 4.9.130-2 (2018-10-27) x86_64 +- name: ftp server install 
- +  hosts: localhost 
-The programs included with the Debian GNU/Linux system are free software; +  gather_factsno 
-the exact distribution terms for each program are described in the +  become: yes 
-individual files in /usr/share/doc/*/copyright. +  vars_files: 
- +    users.yml 
-Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent +  tasks: 
-permitted by applicable law. +    name: latest vsftpd version 
-Last loginSun Apr 12 10:07:57 2020 from 10.0.2.2 +      yum: 
-trainee@ansible:~$+        name: vsftpd 
 +        state: latest 
 +    name: latest firewalld version 
 +        name: firewalld 
 +        state: latest 
 +    name: vsftpd 
 +      service: 
 +        name vsftpd 
 +        enabled: true 
 +        state: started 
 +    - name: firewalld 
 +      service: 
 +        name: firewalld 
 +        enabledtrue 
 +        statestarted 
 +    - namefirewalld allows ftp 
 +      firewalld: 
 +        permanent: yes 
 +        immediate: yes 
 +        state: enabled 
 +    - name: Create_FTP_users 
 +      user: 
 +        password: "{{ item.password | password_hash(sha512) }}" 
 +        with_items"{{ ftp_users }}"
 </code> </code>
- 
-=====LAB #14 - Préparer Windows 10===== 
- 
-====Formations en FFP=== 
- 
-Lancez le logiciel VirtuelBox puis lancez la machine virtuelle **Windows10**. 
- 
-====Formations en FAD==== 
- 
-Lancez le logiciel **X2Go Client**. Cliquez ensuite sur : 
- 
-  Session > Nouvelle session 
- 
-Dans la fenêtre qui s'ouvre, renseignez les informations suivantes en remplacant **XX** par le numéro de votre serveur et cliquez sur le bouton **OK** : 
- 
-{{ :elearning:workbooks:debian:6:avance:l130:win10-1.png?direct&600 |}} 
- 
-Dans le volet de droite, cliquez sur l'icône du serverXX.ittraining.network : 
- 
-{{ :elearning:workbooks:debian:6:avance:l130:win10-2.png?direct&600 |}} 
- 
-Renseignez le mot de passe qui vous a été communiqué et cliquez sur le bouton **OK**. 
- 
-Lancez le logiciel VirtualBox sur votre serveur puis lancez la machine virtuelle **Windows10**. 
- 
-====Mettre à Jour PowerShell et .NET==== 
- 
-Afin de mettre à jour les versions de PowerShell et .NET, Ansible fournit un script appelé **Upgrade-PowerShell.ps1**. Exécutez PowerShell en tant qu'Administrateur : 
  
 <code> <code>
-Windows PowerShell +[root@centos7 ~]# ansible-vault view secrets.yml 
-Copyright (C) Microsoft Corporation. Tous droits réservés. +Vault password: fenestros 
- +ftp_users
-Testez le nouveau système multiplateforme PowerShell https://aka.ms/pscore6 + username: mike, password: toto } 
- + { usernamebobpasswordtata }
-PS C:\Windows\system32> $url = "https://raw.githubusercontent.com/jborean93/ansible-windows/master/scripts/Upgrade-PowerShell.ps1" +
-PS C:\Windows\system32> $file = "$env:temp\Upgrade-PowerShell.ps1" +
-PS C:\Windows\system32> $username = "hughn" +
-PS C:\Windows\system32> $password = "P@$$w0rd" +
-PS C:\Windows\system32> (New-Object -TypeName System.Net.WebClient).DownloadFile($url, $file) +
-PS C:\Windows\system32> Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Force +
-PS C:\Windows\system32> &$file -Version 5.1 -Username $username -Password $password -Verbose +
-COMMENTAIRES 2019-10-24T09:36:23 - INFO - starting script +
-COMMENTAIRES : 2019-10-24T09:36:23 - INFO - current and target PS version are the sameno action is required +
-COMMENTAIRES 2019-10-24T09:36:23 - INFO - clearing auto logon registry properties+
 </code> </code>
  
-Au cas où, vous pouvez enlever l'auto-login de l'administrateur et remettre la politique d'exécution à **Restricted** avec les commandes suivantes :+Lors de l'exécution de la commande ansible-playback, vous obtenez le résultat suivant :
  
 <code> <code>
-PS C:\Windows\system32> Set-ExecutionPolicy -ExecutionPolicy Restricted -Force +[root@centos7 ~]# ansible-playbook vsftpd.yml 
-PS C:\Windows\system32> $reg_winlogon_path = "HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" + [WARNING]Could not match supplied host pattern, ignoringall
-PS C:\Windows\system32> Set-ItemProperty -Path $reg_winlogon_path -Name AutoAdminLogon -Value 0 +
-PS C:\Windows\system32> Remove-ItemProperty -Path $reg_winlogon_path -Name DefaultUserName -ErrorAction SilentlyContinue +
-PS C:\Windows\system32> Remove-ItemProperty -Path $reg_winlogon_path -Name DefaultPassword -ErrorAction SilentlyContinue +
-PS C:\Windows\system32> +
-</code>+
  
-====Configurer WinRM==== + [WARNING]provided hosts list is emptyonly localhost is available
- +
-Pour mettre en place un **listener** WinRM en HTTP et un **listener** WinRM en HTTPS, créer un certificat auto-signé et activer l'authentification de base sur le service WinRM, utilisez le script **ConfigureRemotingForAnsible.ps1** : +
- +
-<code> +
-PS C:\Windows\system32> $url = "https://raw.githubusercontent.com/ansible/ansible/devel/examples/scripts/ConfigureRemotingForAnsible.ps1" +
-PS C:\Windows\system32> $file = "$env:temp\ConfigureRemotingForAnsible.ps1" +
-PS C:\Windows\system32> (New-Object -TypeName System.Net.WebClient).DownloadFile($url$file) +
-PS C:\Windows\system32> powershell.exe -ExecutionPolicy ByPass -File $file +
-Self-signed SSL certificate generated; thumbprint: 17502EEEAC259F4C76D0F199A4B803E94E980CAD+
  
 +ERROR! Syntax Error while loading YAML.
  
-wxf                 : http://schemas.xmlsoap.org/ws/2004/09/transfer 
-a                   : http://schemas.xmlsoap.org/ws/2004/08/addressing 
-w                   : http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd 
-lang                : fr-FR 
-Address             : http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous 
-ReferenceParameters : ReferenceParameters 
  
-Ok.+The error appears to have been in '/root/vsftpd.yml': line 14, column 13, but may 
 +be elsewhere in the file depending on the exact syntax problem.
  
 +The offending line appears to be:
  
 +    - name: latest firewalld version
 +        name: firewalld
 +        ^ here
  
-PS C:\Windows\system32>+exception type<class 'yaml.scanner.ScannerError'> 
 +exception: mapping values are not allowed in this context 
 + in "<unicode string>", line 14, column 13
 </code> </code>
  
-====Consulter les Informations sur WinRM====+A vous de jouer !
  
-Pour voir la liste des listeners ainsi créésutilisez la commande suivante :+[isauth account,@admin]
  
-<code> +====1.2 - Corrigés====
-PS C:\Windows\system32> winrm enumerate winrm/config/Listener +
-Listener +
-    Address +
-    Transport HTTP +
-    Port 5985 +
-    Hostname +
-    Enabled true +
-    URLPrefix wsman +
-    CertificateThumbprint +
-    ListeningOn 10.0.2.15, 10.29.0.34, 127.0.0.1, ::1+
  
-Listener +===Erreur #1===
-    Address +
-    Transport HTTPS +
-    Port 5986 +
-    Hostname DESKTOP-1OV5NMP +
-    Enabled true +
-    URLPrefix wsman +
-    CertificateThumbprint = 17502EEEAC259F4C76D0F199A4B803E94E980CAD +
-    ListeningOn = 10.0.2.15, 10.29.0.34, 127.0.0.1, ::1+
  
-PS C:\Windows\system32> +Éditez le fichier **vsftpd.yml** :
-</code> +
- +
-Pour obtenir les informations concernant le certificat, exécutez les commandes suivantes :+
  
 <code> <code>
-PS C:\Windows\system32> $thumbprint = "17502EEEAC259F4C76D0F199A4B803E94E980CAD" +[root@centos7 ~]# vi vsftpd.yml 
-PS C:\Windows\system32> Get-ChildItem -Path cert:\LocalMachine\My -Recurse | Where-Object { $_.Thumbprint -eq $thumbprint } | Select-Object * +[root@centos7 ~]# cat vsftpd.yml 
- +--- 
- +name: ftp server install 
-PSPath                   Microsoft.PowerShell.Security\Certificate::LocalMachine\My\17502EEEAC259F4C76D0F199A4B803E94 +  hosts: localhost 
-                           E980CAD +  gather_facts: no 
-PSParentPath             : Microsoft.PowerShell.Security\Certificate::LocalMachine\My +  becomeyes 
-PSChildName              17502EEEAC259F4C76D0F199A4B803E94E980CAD +  vars_files
-PSDrive                  Cert +    - users.yml 
-PSProvider               Microsoft.PowerShell.Security\Certificate +  tasks
-PSIsContainer            False +    - namelatest vsftpd version 
-EnhancedKeyUsageList     {Authentification du serveur (1.3.6.1.5.5.7.3.1)} +      yum
-DnsNameList              {DESKTOP-1OV5NMP, DESKTOP-1OV5NMP} +        namevsftpd 
-SendAsTrustedIssuer      : False +        statelatest 
-EnrollmentPolicyEndPoint Microsoft.CertificateServices.Commands.EnrollmentEndPointProperty +    - namelatest firewalld version 
-EnrollmentServerEndPoint Microsoft.CertificateServices.Commands.EnrollmentEndPointProperty +      yum  <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<Ajouter yum
-PolicyId                 +        namefirewalld 
-Archived                 False +        statelatest 
-Extensions               {System.Security.Cryptography.Oid, System.Security.Cryptography.Oid, +    - namevsftpd 
-                           System.Security.Cryptography.Oid, System.Security.Cryptography.Oid} +      service
-FriendlyName             +        name vsftpd 
-IssuerName               System.Security.Cryptography.X509Certificates.X500DistinguishedName +        enabledtrue 
-NotAfter                 22/10/2022 11:45:21 +        statestarted 
-NotBefore                23/10/2019 11:45:21 +    - namefirewalld 
-HasPrivateKey            True +      service
-PrivateKey               System.Security.Cryptography.RSACryptoServiceProvider +        namefirewalld 
-PublicKey                System.Security.Cryptography.X509Certificates.PublicKey +        enabledtrue 
-RawData                  {48, 130, 5, 49...} +        statestarted 
-SerialNumber             73F2EADFBABB86B7438B30B157A1C3FB +    - namefirewalld allows ftp 
-SubjectName              System.Security.Cryptography.X509Certificates.X500DistinguishedName +      firewalld
-SignatureAlgorithm       System.Security.Cryptography.Oid +        permanentyes 
-Thumbprint               17502EEEAC259F4C76D0F199A4B803E94E980CAD +        immediateyes 
-Version                  3 +        stateenabled 
-Handle                   2829331536176 +    - nameCreate_FTP_users 
-Issuer                   CN=DESKTOP-1OV5NMP +      user
-Subject                  CN=DESKTOP-1OV5NMP +        password"{{ item.password | password_hash(sha512) }}" 
- +        with_items"{{ ftp_users }}"
- +
- +
-PS C:\Windows\system32>+
 </code> </code>
  
-Dernièrement pour obtenir des informations concernant le service, exécutez les deux commandes suivantes :+Relancez la commande **ansible-playbook** :
  
 <code> <code>
-PS C:\Windows\system32> winrm get winrm/config/Service +[root@centos7 ~]# ansible-playbook vsftpd.yml 
-Service +[WARNING]provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all' 
-    RootSDDL = O:NSG:BAD:P(A;;GA;;;BA)(A;;GR;;;IU)S:P(AU;FA;GA;;;WD)(AU;SA;GXGW;;;WD) +ERROR! Syntax Error while loading YAML. 
-    MaxConcurrentOperations = 4294967295 +  mapping values are not allowed in this context 
-    MaxConcurrentOperationsPerUser = 1500 + 
-    EnumerationTimeoutms = 240000 +The error appears to be in '/root/vsftpd.yml': line 20, column 16, but may 
-    MaxConnections = 300 +be elsewhere in the file depending on the exact syntax problem.
-    MaxPacketRetrievalTimeSeconds = 120 +
-    AllowUnencrypted = false +
-    Auth +
-        Basic = true +
-        Kerberos = true +
-        Negotiate = true +
-        Certificate = false +
-        CredSSP = false +
-        CbtHardeningLevel = Relaxed +
-    DefaultPorts +
-        HTTP = 5985 +
-        HTTPS = 5986 +
-    IPv4Filter = * +
-    IPv6Filter = * +
-    EnableCompatibilityHttpListener = false +
-    EnableCompatibilityHttpsListener = false +
-    CertificateThumbprint +
-    AllowRemoteAccess = true+
  
-PS C:\Windows\system32> winrm get winrm/config/Winrs +The offending line appears to be:
-Winrs +
-    AllowRemoteShellAccess = true +
-    IdleTimeout = 7200000 +
-    MaxConcurrentUsers = 2147483647 +
-    MaxShellRunTime = 2147483647 +
-    MaxProcessesPerShell = 2147483647 +
-    MaxMemoryPerShellMB = 2147483647 +
-    MaxShellsPerUser = 2147483647+
  
-PS C:\Windows\system32>+        name vsftpd 
 +        enabledtrue 
 +               ^ here
 </code> </code>
  
-====Créer un Utilisateur Local pour Ansible====+===Erreur #2===
  
-Créez un utilisateur local appelé **trainee ayant un mot de passe trainee** et le type de compte **Administrateur**.  +Editez le fichier **vsftpd.yml** :
- +
-Exécutez ensuite la commande suivante :+
  
 <code> <code>
-PS C:\Windows\system32> winrm configSDDL default +[root@centos7 ~]# vi vsftpd.yml 
-Service +[root@centos7 ~]# cat vsftpd.yml 
-    RootSDDL = O:NSG:BAD:P(A;;GA;;;BA)(A;;GR;;;IU)(A;;GXGR;;;S-1-5-21-1664865965-3091009943-3054596003-1002)S:P(AU;FA;GA;;;WD)(AU;SA;GXGW;;;WD) +--- 
-    MaxConcurrentOperations = 4294967295 +nameftp server install 
-    MaxConcurrentOperationsPerUser = 1500 +  hosts: localhost 
-    EnumerationTimeoutms = 240000 +  gather_facts: no 
-    MaxConnections = 300 +  become: yes 
-    MaxPacketRetrievalTimeSeconds = 120 +  vars_files: 
-    AllowUnencrypted = false +    - users.yml 
-    Auth +  tasks: 
-        Basic = true +    - name: latest vsftpd version 
-        Kerberos = true +      yum: 
-        Negotiate = true +        name: vsftpd 
-        Certificate = false +        state: latest 
-        CredSSP = false +    - name: latest firewalld version 
-        CbtHardeningLevel = Relaxed +      yum:   <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<Ajouter yum: 
-    DefaultPorts +        name: firewalld 
-        HTTP = 5985 +        state: latest 
-        HTTPS = 5986 +    - name: vsftpd 
-    IPv4Filter = * +      service: 
-    IPv6Filter = * +        name: vsftpd <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<Ajouter le caractère : après name 
-    EnableCompatibilityHttpListener = false +        enabled: true 
-    EnableCompatibilityHttpsListener = false +        state: started 
-    CertificateThumbprint +    - name: firewalld 
-    AllowRemoteAccess = true +      service: 
- +        name: firewalld 
-PS C:\Windows\system32>+        enabled: true 
 +        state: started 
 +    - name: firewalld allows ftp 
 +      firewalld: 
 +        permanent: yes 
 +        immediate: yes 
 +        state: enabled 
 +    - name: Create_FTP_users 
 +      user: 
 +        password: "{{ item.password | password_hash(sha512) }}" 
 +        with_items"{{ ftp_users }}"
 </code> </code>
  
-Dans la fenêtre **Autorisations pour Default**, ajoutez l'utilisateur pour Ansible et accordez lui les permissions **Exécution** en plus des permissions **Lecture** : +Relancez la commande **ansible-playbook** :
- +
-{{ :elearning:workbooks:debian:6:avance:l130:win10.png?direct&600 |}} +
- +
-=====LAB #15 Préparer le Contrôleur Ansible===== +
- +
-====Installer pywinrm==== +
- +
-Dans la machine virtuelle **Ansible**, installez le support python pour WinRM :+
  
 <code> <code>
-root@ansible:~# pip3 install "pywinrm>=0.3.0" +[WARNING]provided hosts list is empty, only localhost is availableNote that the implicit localhost does not match 'all' 
-Collecting pywinrm>=0.3.0 +ERROR! vars file users.yml was not found 
-  Downloading https://files.pythonhosted.org/packages/0d/12/13a3117bbd2230043aa32dcfa2198c33269665eaa1a8fa26174ce49b338f/pywinrm-0.3.0-py2.py3-none-any.whl +Could not find file on the Ansible Controller
-Collecting requests-ntlm>=0.3.0 (from pywinrm>=0.3.0) +If you are using a module and expect the file to exist on the remotesee the remote_src option
-  Downloading https://files.pythonhosted.org/packages/03/4b/8b9a1afde8072c4d5710d9fa91433d504325821b038e00237dc8d6d833dc/requests_ntlm-1.1.0-py2.py3-none-any.whl +
-Collecting xmltodict (from pywinrm>=0.3.0) +
-  Downloading https://files.pythonhosted.org/packages/28/fd/30d5c1d3ac29ce229f6bdc40bbc20b28f716e8b363140c26eff19122d8a5/xmltodict-0.12.0-py2.py3-none-any.whl +
-Requirement already satisfied: six in /usr/lib/python3/dist-packages (from pywinrm>=0.3.0) +
-Requirement already satisfied: requests>=2.9.1 in /usr/lib/python3/dist-packages (from pywinrm>=0.3.0) +
-Collecting ntlm-auth>=1.0.2 (from requests-ntlm>=0.3.0->pywinrm>=0.3.0) +
-  Downloading https://files.pythonhosted.org/packages/50/09/5e397eb18685b14fd8b209e26cdb4fa6451c82c1bcc651fef05fa73e7b27/ntlm_auth-1.4.0-py2.py3-none-any.whl +
-Requirement already satisfied: cryptography>=1.3 in /usr/lib/python3/dist-packages (from requests-ntlm>=0.3.0->pywinrm>=0.3.0) +
-Installing collected packages: ntlm-authrequests-ntlm, xmltodict, pywinrm +
-Successfully installed ntlm-auth-1.4.0 pywinrm-0.3.0 requests-ntlm-1.1.0 xmltodict-0.12.0+
 </code> </code>
  
-====Tester la Configuration====+===Erreur #3===
  
-Pour tester la configuration, modifiez le fichier **/etc/hosts** :+Créez le fichier **users.yml** :
  
 <code> <code>
-root@ansible:~# vi /etc/hosts +[root@centos7 ~]# vi users.yml 
-root@ansible:~# cat /etc/hosts +[root@centos7 ~]# cat users.yml  
-127.0.0.1 localhost +ftp_users: 
-127.0.1.1 ansible.i2tch.loc    ansible + { usernamemike, passwordtoto } 
-10.0.2.9 ansible.i2tch.loc    ansible + { usernamebob, passwordtata }
-10.0.2.10   targeta.i2tch.loc    targeta +
-10.0.2.11 web01.i2tch.loc web01 +
-10.0.2.12 web02.i2tch.loc web02 +
-10.0.2.13 web03.i2tch.loc web03 +
-10.0.2.14 web04.i2tch.loc web04 +
-10.0.2.15   windows10.i2tch.loc windows10 +
- +
-# The following lines are desirable for IPv6 capable hosts +
-::1     localhost ip6-localhost ip6-loopback +
-ff02::1 ip6-allnodes +
-ff02::2 ip6-allrouters +
-root@ansible:~# exit +
-déconnexion +
-trainee@ansible:~$+
 </code> </code>
  
-Créez ensuite un Inventory file en tant que trainee :+Relancez la commande **ansible-playbook** :
  
 <code> <code>
-trainee@ansible:~$ vi inventory +[root@centos7 ~]# mv user.yml users.yml  
-trainee@ansible:~$ cat inventory +[root@centos7 ~]# ansible-playbook vsftpd.yml 
-[windows] +[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
-windows10+
  
-[windows:vars] +PLAY [ftp server install***********************************************************************************************************************************************
-ansible_user=trainee +
-ansible_password=trainee +
-ansible_connection=winrm +
-ansible_winrm_server_cert_validation=ignore +
-</code>+
  
-Procédez au test :+TASK [latest vsftpd version] ******************************************************************************************************************************************** 
 +changed[localhost]
  
-<code> +TASK [latest firewalld version] ***************************************************************************************************************************************** 
-trainee@ansible:~$ ansible windows -i inventory -m win_ping +changed: [localhost]
-windows10 | SUCCESS => { +
-    "changed"false, +
-    "ping": "pong" +
-+
-</code>+
  
-=====LAB #16 - Travailler avec Ansible et Windows=====+TASK [vsftpd] *********************************************************************************************************************************************************** 
 +changed: [localhost]
  
-====Obtenir les Informations sur Windows10====+TASK [firewalld] ******************************************************************************************************************************************************** 
 +ok: [localhost]
  
-De la même façon qu'avec Linux, il est possible d'utiliser le module **setup** pour obtenir des Facts :+TASK [firewalld allows ftp] ********************************************************************************************************************************************* 
 +ok[localhost]
  
-<code> +TASK [Create_FTP_users] ************************************************************************************************************************************************* 
-trainee@ansible:~$ ansible windows -i inventory -m setup +fatal[localhost]: FAILED! => {"msg": "The task includes an option with an undefined variableThe error was'sha512' is undefined\n\nThe error appears to be in '/root/vsftpd.yml'line 32column 7but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n        stateenabled\n    nameCreate_FTP_users\n      ^ here\n"} 
-windows10 | SUCCESS => { + 
-    "ansible_facts": +PLAY RECAP ************************************************************************************************************************************************************** 
-        "ansible_architecture": "64 bits", +localhost                  ok=   changed=3    unreachable=   failed=   skipped=   rescued=0    ignored=0  
-        "ansible_bios_date": "12/01/2006", +
-        "ansible_bios_version": "VirtualBox", +
-        "ansible_date_time":+
-            "date": "2019-10-24", +
-            "day": "24", +
-            "epoch": "1571923636,11092", +
-            "hour": "13", +
-            "iso8601": "2019-10-24T11:27:16Z", +
-            "iso8601_basic": "20191024T132716094254", +
-            "iso8601_basic_short": "20191024T132716", +
-            "iso8601_micro": "2019-10-24T11:27:16.094254Z", +
-            "minute": "27", +
-            "month": "10", +
-            "second": "16", +
-            "time": "13:27:16", +
-            "tz": "Romance Standard Time", +
-            "tz_offset": "+02:00", +
-            "weekday": "Thursday", +
-            "weekday_number": "4", +
-            "weeknumber": "42", +
-            "year": "2019" +
-        }, +
-        "ansible_distribution": "Microsoft Windows 10 Professionnel", +
-        "ansible_distribution_major_version": "10", +
-        "ansible_distribution_version": "10.0.18362.0", +
-        "ansible_domain": "", +
-        "ansible_env":+
-            "ALLUSERSPROFILE": "C:\\ProgramData", +
-            "APPDATA": "C:\\Users\\trainee\\AppData\\Roaming", +
-            "COMPUTERNAME": "DESKTOP-1OV5NMP", +
-            "ComSpec": "C:\\Windows\\system32\\cmd.exe", +
-            "CommonProgramFiles""C:\\Program Files\\Common Files", +
-            "CommonProgramFiles(x86)": "C:\\Program Files (x86)\\Common Files", +
-            "CommonProgramW6432": "C:\\Program Files\\Common Files", +
-            "DriverData": "C:\\Windows\\System32\\Drivers\\DriverData", +
-            "LOCALAPPDATA": "C:\\Users\\trainee\\AppData\\Local", +
-            "NUMBER_OF_PROCESSORS": "4", +
-            "OS": "Windows_NT", +
-            "PATHEXT": ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.CPL", +
-            "PROCESSOR_ARCHITECTURE": "AMD64", +
-            "PROCESSOR_IDENTIFIER": "Intel64 Family 6 Model 142 Stepping 10, GenuineIntel", +
-            "PROCESSOR_LEVEL": "6", +
-            "PROCESSOR_REVISION": "8e0a", +
-            "PROMPT": "$P$G", +
-            "PSExecutionPolicyPreference": "Unrestricted", +
-            "PSModulePath": "C:\\Users\\trainee\\Documents\\WindowsPowerShell\\Modules;C:\\Program Files\\WindowsPowerShell\\Modules;C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules", +
-            "PUBLIC": "C:\\Users\\Public", +
-            "Path": "C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\System32\\OpenSSH\\;C:\\Users\\trainee\\AppData\\Local\\Microsoft\\WindowsApps", +
-            "ProgramData": "C:\\ProgramData", +
-            "ProgramFiles": "C:\\Program Files", +
-            "ProgramFiles(x86)": "C:\\Program Files (x86)", +
-            "ProgramW6432": "C:\\Program Files", +
-            "SystemDrive": "C:", +
-            "SystemRoot": "C:\\Windows", +
-            "TEMP": "C:\\Users\\trainee\\AppData\\Local\\Temp", +
-            "TMP": "C:\\Users\\trainee\\AppData\\Local\\Temp", +
-            "USERDOMAIN": "DESKTOP-1OV5NMP", +
-            "USERNAME": "trainee", +
-            "USERPROFILE": "C:\\Users\\trainee"+
-            "windir": "C:\\Windows" +
-        }, +
-        "ansible_fqdn": "DESKTOP-1OV5NMP.", +
-        "ansible_hostname": "DESKTOP-1OV5NMP", +
-        "ansible_interfaces":+
-            { +
-                "connection_name": "Ethernet", +
-                "default_gateway": "10.0.2.1", +
-                "dns_domain": "expressvpn", +
-                "interface_index": 5+
-                "interface_name": "Intel(R) PRO/1000 MT Desktop Adapter", +
-                "macaddress": "08:00:27:07:68:97" +
-            } +
-        ], +
-        "ansible_ip_addresses":+
-            "10.0.2.15" +
-        ], +
-        "ansible_kernel": "10.0.18362.0", +
-        "ansible_lastboot": "2019-10-24 12:05:22Z", +
-        "ansible_machine_id": "S-1-5-21-1664865965-3091009943-3054596003", +
-        "ansible_memtotal_mb": 2048, +
-        "ansible_nodename": "DESKTOP-1OV5NMP.", +
-        "ansible_os_family": "Windows", +
-        "ansible_os_name": "Microsoft Windows 10 Professionnel", +
-        "ansible_os_product_type": "workstation", +
-        "ansible_owner_contact": "", +
-        "ansible_owner_name": "hugh.norris@i2tch.eu", +
-        "ansible_powershell_version": 5, +
-        "ansible_processor":+
-            "GenuineIntel", +
-            "Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz", +
-            "GenuineIntel", +
-            "Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz", +
-            "GenuineIntel", +
-            "Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz", +
-            "GenuineIntel", +
-            "Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz" +
-        ], +
-        "ansible_processor_cores": 4, +
-        "ansible_processor_count": 1, +
-        "ansible_processor_threads_per_core": 1, +
-        "ansible_processor_vcpus": 4, +
-        "ansible_product_name": "VirtualBox", +
-        "ansible_product_serial": "0", +
-        "ansible_reboot_pending": false, +
-        "ansible_swaptotal_mb": 0+
-        "ansible_system": "Win32NT", +
-        "ansible_system_description": "", +
-        "ansible_system_vendor": "innotek GmbH", +
-        "ansible_uptime_seconds": 4921, +
-        "ansible_user_dir": "C:\\Users\\trainee", +
-        "ansible_user_gecos": "", +
-        "ansible_user_id": "trainee", +
-        "ansible_user_sid": "S-1-5-21-1664865965-3091009943-3054596003-1002", +
-        "ansible_virtualization_role": "guest", +
-        "ansible_virtualization_type": "VirtualBox", +
-        "ansible_win_rm_certificate_expires": "2022-10-22 11:45:21", +
-        "ansible_windows_domain": "WORKGROUP", +
-        "ansible_windows_domain_member": false, +
-        "ansible_windows_domain_role": "Stand-alone workstation", +
-        "gather_subset":+
-            "all" +
-        ], +
-        "module_setup": true +
-    }, +
-    "changed": false +
-}+
 </code> </code>
  
-====Exécutez une Commande==== +===Erreurs 4, 5 et 6===
- +
-Créez le PlayBook **command.yml** :+
  
 <code> <code>
-trainee@ansible:~vi command.yml +[root@centos7 ~]# vi vsftpd.yml 
-trainee@ansible:~cat command.yml+[root@centos7 ~]# cat vsftpd.yml
 --- ---
-- name: ipconfig +- name: ftp server install 
-  hosts: windows+  hosts: localhost 
 +  gather_facts: no 
 +  become: yes 
 +  vars_files: 
 +    - users.yml
   tasks:   tasks:
-    - name: run ipconfig +    - name: latest vsftpd version 
-      win_commandipconfig +      yum: 
-      registeripconfig +        name: vsftpd 
-    - debugvar=ipconfig+        state: latest 
 +    - name: latest firewalld version 
 +      yum:   <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<Ajouter yum: 
 +        name: firewalld 
 +        state: latest 
 +    - name: vsftpd 
 +      service: 
 +        name: vsftpd <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<Ajouter le caractère : après name 
 +        enabled: true 
 +        state: started 
 +    - name: firewalld 
 +      service: 
 +        name: firewalld 
 +        enabled: true 
 +        state: started 
 +    - name: firewalld allows ftp 
 +      firewalld: 
 +        permanent: yes 
 +        immediate: yes 
 +        state: enabled 
 +    - name: Create_FTP_users 
 +      user: 
 +        name: "{{ item.username }}"  <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<Ajouter la ligne name: 
 +        password: "{{ item.password | password_hash('sha512') }}" <<<<<<<<<<<<Entourer sha512 avec des caractères ' 
 +      with_items: "{{ ftp_users }}" <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<Aligner with_items: avec user:
 </code> </code>
  
-Exécutez le PlayBook :+Relancez la commande **ansible-playbook** :
  
 <code> <code>
-trainee@ansible:~ansible-playbook command.yml -i inventory+[root@centos7 ~]# ansible-playbook vsftpd.yml 
 +[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
  
-PLAY [ipconfig*********************************************************************************************************************************************************+PLAY [ftp server install] ***********************************************************************************************************************************************
  
-TASK [Gathering Facts************************************************************************************************************************************************** +TASK [latest vsftpd version] ******************************************************************************************************************************************** 
-ok: [windows10]+ok: [localhost]
  
-TASK [run ipconfig***************************************************************************************************************************************************** +TASK [latest firewalld version] ***************************************************************************************************************************************** 
-changed: [windows10]+ok: [localhost]
  
-TASK [debug************************************************************************************************************************************************************ +TASK [vsftpd] *********************************************************************************************************************************************************** 
-ok: [windows10=> { +ok: [localhost]
-    "ipconfig":+
-        "changed": true, +
-        "cmd": "ipconfig", +
-        "delta": "0:00:00.087233", +
-        "end": "2019-10-24 12:09:59.585841", +
-        "failed": false, +
-        "rc": 0, +
-        "start": "2019-10-24 12:09:59.498608", +
-        "stderr": "", +
-        "stderr_lines": [], +
-        "stdout": "\r\nConfiguration IP de Windows\r\n\r\n\r\nCarte Ethernet Ethernet 2 :\r\n\r\n   Statut du m�dia. . . . . . . . . . . . : M�dia d�connect�\r\n   Suffixe DNS propre � la connexion. . . : \r\n\r\nCarte Ethernet Ethernet :\r\n\r\n   Suffixe DNS propre � la connexion. . . : expressvpn\r\n   Adresse IPv4. . . . . . . . . . . . . .: 10.0.2.15\r\n   Masque de sous-r�seau. . . .�. . . . . : 255.255.255.0\r\n   Passerelle par d�faut. . . .�. . . . . : 10.0.2.1\r\n", +
-        "stdout_lines":+
-            "", +
-            "Configuration IP de Windows", +
-            "", +
-            "", +
-            "Carte Ethernet Ethernet 2 :", +
-            "", +
-            "   Statut du m�dia. . . . . . . . . . . . : M�dia d�connect�", +
-            "   Suffixe DNS propre � la connexion. . . : ", +
-            "", +
-            "Carte Ethernet Ethernet :", +
-            "", +
-            "   Suffixe DNS propre � la connexion. . . : expressvpn", +
-            "   Adresse IPv4. . . . . . . . . . . . . .: 10.0.2.15", +
-            "   Masque de sous-r�seau. . . .�. . . . . : 255.255.255.0", +
-            "   Passerelle par d�faut. . . .�. . . . . : 10.0.2.1" +
-        ] +
-    } +
-}+
  
-PLAY RECAP ************************************************************************************************************************************************************** +TASK [firewalld] ******************************************************************************************************************************************************** 
-windows10                  ok=3    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0      +ok[localhost]
-</code>+
  
-====Exécuter un script PowerShell====+TASK [firewalld allows ftp] ********************************************************************************************************************************************* 
 +ok: [localhost]
  
-Créez un script PowerShell pour démarrer le service Windows Update :+TASK [Create_FTP_users] ************************************************************************************************************************************************* 
 +changed[localhost] => (item={u'username': u'mike', u'password': u'toto'}) 
 +changed: [localhost] => (item={u'username': u'bob', u'password': u'tata'})
  
-<code> +PLAY RECAP ************************************************************************************************************************************************************** 
-trainee@ansible:~$ vi script1.ps1 +localhost                  ok=6    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0  
-trainee@ansible:~$ cat script1.ps1 +
-Start-Service -Name wuauserv+
 </code> </code>
  
-Créez ensuite un PlayBook appelé **winupdate.yml** :+Crypter le fichier users.yml :
  
 <code> <code>
-trainee@ansible:~$ vi winupdate.yml +[root@centos7 ~]# ansible-vault encrypt users.yml 
-trainee@ansible:~$ cat winupdate.yml +New Vault passwordfenestros 
-- name"PowerShell script" +Confirm New Vault passwordfenestros 
-  hosts"windows" +Encryption successful
-  gather_facts: "false" +
-  tasks: +
-    - name: "Windows Update" +
-      script: "script1.ps1"+
 </code> </code>
  
-Exécutez le PlayBook :+Consultez le fichier users.yml :
  
 <code> <code>
-trainee@ansible:~ansible-playbook winupdate.yml -i inventory+[root@centos7 ~]# ansible-vault view users.yml 
 +Vault password:  
 +ftp_users: 
 + { username: mike, password: toto } 
 + - { username: bob, password: tata }
  
-PLAY [PowerShell script************************************************************************************************************************************************ +[root@centos7 ~]# cat users.yml  
- +$ANSIBLE_VAULT;1.1;AES256 
-TASK [Windows Update] *************************************************************************************************************************************************** +30323061313265353234666230373765333865663061626362646332376639356463623238343166 
-changed: [windows10] +3635356261383732373633626230353837393735393933390a323561663963666262343835363166 
- +61306137383463303138656131626236633935383031323864396164366139323265653732663834 
-PLAY RECAP ************************************************************************************************************************************************************** +6130656163356661360a663635333537373961616230353766666130633537323065663161393939 
-windows10                  : ok=1    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0 +65353936613539303631373530643536616335356461323735646165616136303839636166663232 
 +38616133393235636632646461346430373966306463636662333431373936633837616336326461 
 +38633139616339343865626630333531366138313761663330346231333131346535663761396233 
 +35353036373530323636636335336539616433373461653866316138306632323038626266623264 
 +6634
 </code> </code>
  
-====Installer un Logiciel avec Chocolatey====+Exécutez le playbook :
  
-**[[https://chocolatey.org/|Chocolatey]]** est un gestionnaire de paquets pour Windows(tm).+<code> 
 +[root@centos7 ~]# ansible-playbook vsftpd.yml --ask-vault-pass 
 +Vault password: fenestros 
 +[WARNING]: provided hosts list is empty, only localhost is availableNote that the implicit localhost does not match 'all'
  
-Créez le PlayBook **firefox.yml** :+PLAY [ftp server install] *************************************************************************************************************************************************
  
-<code> +TASK [latest vsftpd version] ********************************************************************************************************************************************** 
-trainee@ansible:~$ vi firefox.yml +ok[localhost]
-trainee@ansible:~$ cat firefox.yml +
---- +
-- name: Install Firefox using Chocolatey +
-  hosts: all +
-  tasks: +
-    - name: Install Firefox +
-      win_chocolatey: +
-        name: firefox +
-        state: present +
-</code>+
  
-Exécutez le PlayBook :+TASK [latest firewalld version] ******************************************************************************************************************************************* 
 +ok[localhost]
  
-<code> +TASK [vsftpd] ************************************************************************************************************************************************************* 
-trainee@ansible:~$ ansible-playbook firefox.yml -i inventory+ok[localhost]
  
-PLAY [Install Firefox using Chocolatey] *********************************************************************************************************************************+TASK [firewalld] ********************************************************************************************************************************************************** 
 +ok: [localhost]
  
-TASK [Gathering Facts************************************************************************************************************************************************** +TASK [firewalld allows ftp] *********************************************************************************************************************************************** 
-ok: [windows10]+ok: [localhost]
  
-TASK [Install Firefox] ************************************************************************************************************************************************** +TASK [Create_FTP_users*************************************************************************************************************************************************** 
-[WARNING]: Chocolatey was missing from this systemso it was installed during this task run.+changed: [localhost=> (item={u'username'u'mike'u'password': u'toto'}) 
 +changed: [localhost] => (item={u'username': u'bob', u'password': u'tata'})
  
-changed: [windows10] +PLAY RECAP **************************************************************************************************************************************************************** 
- +localhost                  : ok=   changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
-PLAY RECAP ************************************************************************************************************************************************************** +
-windows10                  : ok=   changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   +
 </code> </code>
  
-====Créer un Utilisateur Local====+Notez que malgré le fait que le fichier **users.yml** soit crypté, les mots de passe des utilisateurs apparaissent en clair lors de l'exécution de la commande **ansible-playbook**. Pour palier à ce problème de sécurité, ajoutez **no_log: True** à la fin du fichier **vsftpd.yml** :
  
-Créez le PlayBook **user.yml** : 
  
 <code> <code>
-trainee@ansible:~vi users.yml +[root@centos7 ~]# vi vsftpd.yml 
-trainee@ansible:~cat users.yml +[root@centos7 ~]# cat vsftpd.yml 
---- +... 
-- name: Create a user +    - name: Create_FTP_users 
-  hosts: windows +      user
-  tasks: +        name: "{{ item.username }}" # pas d'instruction name 
-    - name: Create Jean +        password: "{{ item.password | password_hash('sha512') }}" # erreur de guillement 
-      win_user+      with_items"{{ ftp_users }}" # erreur d'indentation 
-        name: jean +      no_logTrue
-        password: P@$$w0rd +
-        statepresent +
-        groups: +
-          - utilisateurs+
 </code> </code>
  
-Exécutez le PlayBook :+De cette façon lors de l'exécution de la commande **ansible-playbook** vous obtiendrez :
  
 <code> <code>
-trainee@ansible:~ansible-playbook users.yml -i inventory+[root@centos7 ~]# ansible-playbook vsftpd.yml --ask-vault-pass 
 +Vault password: fenestros 
 +[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all' 
 +... 
 +TASK [Create_FTP_users] *************************************************************************************************************************************************** 
 +changed: [localhost] => (item=None) 
 +changed: [localhost] => (item=None)
  
-PLAY [Create a user] **************************************************************************************************************************************************** +PLAY RECAP **************************************************************************************************************************************************************** 
- +localhost                  : ok=   changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0 
-TASK [Gathering Facts] ************************************************************************************************************************************************** +
-ok: [windows10] +
- +
-TASK [Create Jean] ****************************************************************************************************************************************************** +
-changed: [windows10] +
- +
-PLAY RECAP ************************************************************************************************************************************************************** +
-windows10                  : ok=   changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0 +
 </code> </code>
  
-Vérifiez que le compte a été créé :+[/isauth]
  
-{{ :elearning:workbooks:debian:6:avance:l130:win101.png?direct&600 |}}+-----
  
------ +Copyright © 2022 Hugh Norris.
-<html> +
-<div align="center"> +
-Copyright © 2020 Hugh NORRIS +
-</div> +
-</html>+
Menu