Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| elearning:workbooks:debian:6:avance:l130:part4 [2021/12/29 10:30] – admin | elearning:workbooks:debian:6:avance:l130:part4 [2023/08/25 01:31] (Version actuelle) – admin | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| ~~PDF: | ~~PDF: | ||
| - | Version | + | Version |
| Dernière mise-à-jour : ~~LASTMOD~~ | Dernière mise-à-jour : ~~LASTMOD~~ | ||
| - | ====== | + | ======LCF804 |
| =====Contenu du Module===== | =====Contenu du Module===== | ||
| - | * **DOF504 | + | * **LCF804 |
| * Contenu du Module | * Contenu du Module | ||
| - | * LAB #1 - Utilisation des Facts d'Ansible | + | * LAB #1 - Ansible |
| - | * LAB #2 - La Commande ansible-vault | + | * 1.1 - Présentation de Docker |
| - | * 2.1 - Crypter le Fichier | + | * 1.2 - Installer Docker |
| - | * 2.2 - Editer le Fichier | + | * 1.3 - La Connexion à Docker |
| - | * 2.3 - Décrypter le Fichier | + | * LAB #2 - Préparer Windows 10 |
| - | * 2.4 - Utilisation de Mots de Passe Aléatoires | + | * 2.1 - Mettre à Jour PowerShell et .NET |
| - | * LAB #3 - Ansible | + | * 2.2 - Configurer WinRM |
| - | * 3.1 - Présentation de Docker | + | * 2.3 - Consulter les Informations sur WinRM |
| - | * 3.2 - Installer Docker | + | * 2.4 - Créer un Utilisateur Local pour Ansible |
| - | * 3.3 - La Connexion à Docker | + | * LAB #3 - Préparer le Contrôleur |
| + | * 3.1 - Installer pywinrm | ||
| + | * 3.2 - Tester la Configuration | ||
| + | * LAB #4 - Travailler avec Ansible et Windows | ||
| + | * 4.1 - Obtenir les Informations sur Windows10 | ||
| + | * 4.2 - Exécuter une Commande | ||
| + | * 4.3 - Exécuter un script PowerShell | ||
| + | * 4.4 - Installer un Logiciel avec Chocolatey | ||
| + | * 4.5 - Créer un Utilisateur Local | ||
| - | =====LAB #1 - Utilisation des Facts d'Ansible===== | + | =====LAB #1 - Ansible |
| - | Ansible Facts sont : | + | ====1.1 - Présentation de Docker==== |
| - | * des variables collectées automatiquement par le module | + | Docker est une application de virtualisation légère qui utilise |
| - | | + | |
| - | Il est cependant possible | + | Une **image** |
| - | <code> | + | * le code |
| - | trainee@ansible: | + | * un runtime |
| - | / | + | |
| - | | + | * des variables d' |
| - | web01 | SUCCESS => { | + | * des fichiers de configuration |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | ], | + | |
| - | " | + | |
| - | " | + | |
| - | ], | + | |
| - | " | + | |
| - | " | + | |
| - | }, | + | |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | }, | + | |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | --Plus-- | + | |
| - | </ | + | |
| - | <WRAP center round important 60%> | + | Un **conteneur** est une instance |
| - | **Important** : Notez que le nom de chaque **Fact** commence par **ansible_**. Évitez donc de créer | + | |
| - | </ | + | |
| - | Parmi les Facts, les plus utiles | + | Les conteneurs exécutent des applications nativement en utilisant le noyau de la machine hôte. De ce fait les performances d'un conteneur |
| - | | + | Docker existe en deux versions |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | Ainsi que dictionnaire **ansible_default_ipv4** : | + | ====1.2 - Installer docker==== |
| - | < | + | Docker n'est pas dans le dépôts de CentOS. Afin de l' |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | }, | + | |
| - | </ | + | |
| - | + | ||
| - | Modifiez | + | |
| < | < | ||
| - | trainee@ansible:~/.ansible/roles$ vi inventory | + | [trainee@centos8 roles]$ su - |
| - | trainee@ansible:~/.ansible/roles$ cat inventory | + | Password: fenestros |
| - | [linux] | + | [root@centos8 |
| - | targeta | + | Adding repo from: https://download.docker.com/linux/ |
| - | targetb | + | |
| - | [group1] | + | [root@centos8 ~]# dnf list docker-ce |
| - | localhost ansible_connection=local | + | Docker CE Stable - x86_64 |
| + | Last metadata expiration check: 0:00:01 ago on Wed 09 Mar 2022 12:38:58 EST. | ||
| + | Available Packages | ||
| + | docker-ce.x86_64 | ||
| + | </ | ||
| - | [basededonnees] | + | Installez ensuite la dépendance **containerd** de docker-ce : |
| - | web01 | + | |
| - | [dotcms] | + | < |
| - | web02 | + | [root@centos8 ~]# dnf install https:// |
| - | web03 | + | Last metadata expiration check: 0:06:03 ago on Wed 09 Mar 2022 12:38:58 EST. |
| + | containerd.io-1.2.10-3.2.el7.x86_64.rpm | ||
| + | Dependencies resolved. | ||
| + | ================================================================================================================================================================================================================== | ||
| + | | ||
| + | ================================================================================================================================================================================================================== | ||
| + | Installing: | ||
| + | containerd.io | ||
| + | replacing | ||
| - | [equilibrage] | + | Transaction Summary |
| - | web04 | + | ================================================================================================================================================================================================================== |
| + | Install | ||
| - | [debian:children] | + | Total size: 23 M |
| - | basededonnees | + | Is this ok [y/N]: y |
| - | dotcms | + | |
| - | equilibrage | + | |
| - | + | ||
| - | [debian:vars] | + | |
| - | ansible_user=trainee | + | |
| </ | </ | ||
| - | Modifiez | + | Installez maintenant |
| < | < | ||
| - | trainee@ansible:~/ | + | [root@centos8 |
| - | trainee@ansible: | + | |
| - | --- | + | |
| - | - hosts: all | + | |
| - | become: true | + | |
| - | roles: | + | |
| - | | + | |
| </ | </ | ||
| - | Connectez-vous à la machine TargetA | + | Dernièrement, |
| < | < | ||
| - | trainee@ansible:~/.ansible/ | + | [root@centos8 |
| - | The authenticity of host ' | + | [root@centos8 ~]# systemctl start docker |
| - | ECDSA key fingerprint is SHA256:sEfHBv9azmK60cjqF/aJgUc9jg56slNaZQdAUcvBOvE. | + | [root@centos8 ~]# systemctl status docker |
| - | Are you sure you want to continue connecting | + | ● docker.service - Docker Application Container Engine |
| - | Warning: Permanently added ' | + | Loaded: loaded |
| - | Debian GNU/Linux 9 | + | Active: activating (start) since Wed 2022-03-09 12:48:23 EST; 51s ago |
| - | Linux targeta.i2tch.loc 4.9.0-8-amd64 #1 SMP Debian 4.9.130-2 (2018-10-27) x86_64 | + | Docs: https://docs.docker.com |
| + | Main PID: 59410 (dockerd) | ||
| + | Tasks: 16 | ||
| + | | ||
| + | CGroup: | ||
| + | | ||
| - | The programs included with the Debian GNU/Linux system are free software; | + | Mar 09 12:48:23 centos8.ittraining.loc dockerd[59410]: |
| - | the exact distribution terms for each program are described in the | + | Mar 09 12:48:23 centos8.ittraining.loc dockerd[59410]: |
| - | individual files in /usr/share/doc/*/copyright. | + | Mar 09 12:48:23 centos8.ittraining.loc dockerd[59410]: |
| + | Mar 09 12:48:23 centos8.ittraining.loc dockerd[59410]: | ||
| + | Mar 09 12:48:23 centos8.ittraining.loc dockerd[59410]: | ||
| + | Mar 09 12:48:28 centos8.ittraining.loc dockerd[59410]: | ||
| + | Mar 09 12:48:28 centos8.ittraining.loc dockerd[59410]: | ||
| + | Mar 09 12:48:28 centos8.ittraining.loc dockerd[59410]: | ||
| + | Mar 09 12:48:28 centos8.ittraining.loc dockerd[59410]: | ||
| + | Mar 09 12:48:28 centos8.ittraining.loc dockerd[59410]: | ||
| + | [root@centos8 ~]# docker --version | ||
| + | Docker version 20.10.12, build e91ed57 | ||
| + | [root@centos8 ~]# docker version | ||
| + | Client: Docker Engine - Community | ||
| + | | ||
| + | API version: | ||
| + | Go version: | ||
| + | Git commit: | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| - | Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent | + | Server: Docker Engine - Community |
| - | permitted by applicable law. | + | Engine: |
| - | Last login: Wed Mar 24 11:49:46 2021 from 10.0.2.50 | + | Version: |
| - | trainee@targeta:~$ su - | + | API version: 1.40 (minimum version 1.12) |
| - | Mot de passe : fenestros | + | Go version: |
| - | root@targeta:~# apt-get -y remove openjdk-8-jre | + | Git commit: 99e3ed8919 |
| - | ... | + | Built: Sat Jan 30 03:15:19 2021 |
| - | root@targeta:~# exit | + | |
| - | déconnexion | + | |
| - | trainee@targeta:~$ exit | + | |
| - | déconnexion | + | Version: |
| - | Connection to targeta closed. | + | |
| + | runc: | ||
| + | | ||
| + | | ||
| + | docker-init: | ||
| + | Version: | ||
| + | GitCommit: | ||
| </ | </ | ||
| - | <WRAP center round important | + | <WRAP center round important> |
| - | **Important** | + | **Important** |
| </ | </ | ||
| - | Utilisez la commande scp pour copier le fichier authorized_keys de la machine virtuelle ansible vers la machine virtueke targetb | + | Démarrez un conteneur dénommé **postgresql** en mode détaché à partir d'une image **CentOS** |
| < | < | ||
| - | trainee@ansible: | + | [root@centos8 |
| - | trainee@ansible:~$ scp .ssh/ | + | Unable to find image ' |
| - | The authenticity of host ' | + | latest: Pulling from library/centos |
| - | ECDSA key fingerprint is SHA256:RgOsp/XI7JHNq+oIfHKw+jkHdtTnBIh+Dd7kVmHRxtU. | + | a1d0c7532777: Pull complete |
| - | Are you sure you want to continue connecting (yes/no)? yes | + | Digest: sha256:a27fd8080b517143cbbbab9dfb7c8571c40d67d534bbdee55bd6c473f432b177 |
| - | Warning: Permanently added ' | + | Status: Downloaded newer image for centos: |
| - | trainee@targetb.i2tch.loc' | + | 1028e25f81d14d685678794902cd599aa618eb283d80e274526d71ec9708e69d |
| - | authorized_keys | + | |
| - | trainee@ansible:~$ cd .ansible/ | + | |
| - | trainee@ansible: | + | |
| </ | </ | ||
| - | Connectez-vous à la machine TargetB et supprimez | + | Vérifiez que le conteneur fonctionne |
| < | < | ||
| - | trainee@ansible: | + | [root@centos8 |
| - | Last login: Wed Mar 24 11:01:43 2021 | + | CONTAINER ID |
| - | [trainee@targetb ~]$ yum -y remove java-1.8.0-openjdk | + | 1028e25f81d1 |
| - | Modules complémentaires chargés : fastestmirror, | + | |
| - | Vous devez être super-utilisateur pour exécuter cette commande. | + | |
| - | [trainee@targetb ~]$ su - | + | |
| - | Mot de passe : fenestros | + | |
| - | Dernière connexion : dimanche 21 mars 2021 à 13:34:55 CET sur pts/0 | + | |
| - | [root@targetb | + | |
| - | ... | + | |
| - | [root@targetb ~]# exit | + | |
| - | logout | + | |
| - | [trainee@targetb ~]$ exit | + | |
| - | déconnexion | + | |
| - | Connection to targetb closed. | + | |
| </ | </ | ||
| - | <WRAP center round important 60%> | + | Ajoutez |
| - | **Important** : Notez que le mot de passe **fenestros** ne sera pas en clair. | + | |
| - | </ | + | |
| - | + | ||
| - | Grâce | + | |
| < | < | ||
| - | trainee@ansible:~/ | + | [root@centos8 ~]# usermod -aG docker |
| - | trainee@ansible: | + | [root@centos8 |
| - | --- | + | logout |
| - | - name: install jre (Debian) | + | [trainee@centos8 |
| - | package: name=openjdk-8-jre state=present | + | |
| - | when: ansible_os_family == ' | + | |
| - | + | ||
| - | - name: install jre (CentOS) | + | |
| - | package: name=java-1.8.0-openjdk state=present | + | |
| - | when: ansible_os_family == ' | + | |
| </ | </ | ||
| - | Exécutez | + | Rejoignez le groupe |
| < | < | ||
| - | trainee@ansible: | + | [trainee@centos8 |
| - | /home/ | + | </code> |
| - | from cryptography.exceptions import InvalidSignature | + | |
| - | PLAY [all] ********************************************************************************************************************************************* | + | ====1.3 - La Connexion à Docker==== |
| - | TASK [Gathering Facts] | + | Créez maintenant le Rôle **docker** : |
| - | ok: [targeta] | + | |
| - | ok: [targetb] | + | |
| - | TASK [exemple01.java : install jre (Debian)] *********************************************************************************************************** | + | < |
| - | skipping: | + | [trainee@centos8 roles]$ mkdir docker |
| - | [WARNING]: Updating cache and auto-installing missing dependency: python-apt | + | |
| - | changed: [targeta] | + | |
| - | + | ||
| - | TASK [exemple01.java : install jre (CentOS)] *********************************************************************************************************** | + | |
| - | skipping: [targeta] | + | |
| - | changed: [targetb] | + | |
| - | + | ||
| - | PLAY RECAP ********************************************************************************************************************************************* | + | |
| - | targeta | + | |
| - | targetb | + | |
| </ | </ | ||
| - | Les conditions peuvent être combinées grâce à **and** et **or**. En voici un exemple : | + | Modifiez ensuite le fichier playbook.yaml : |
| - | + | ||
| - | < | + | |
| - | tasks: | + | |
| - | - name: " | + | |
| - | command: / | + | |
| - | when: (ansible_distribution == " | + | |
| - | (ansible_distribution == " | + | |
| - | </ | + | |
| - | + | ||
| - | =====LAB #2 - La Commande ansible-vault===== | + | |
| - | + | ||
| - | La commande **ansible-vault** permet de créer et d' | + | |
| - | + | ||
| - | Pour illustrer son utilisation, | + | |
| < | < | ||
| - | trainee@ansible:~/.ansible/roles$ | + | [trainee@centos8 roles]$ vi playbook.yaml |
| + | [trainee@centos8 | ||
| + | --- | ||
| + | - hosts: all | ||
| + | tasks: | ||
| + | - name: message | ||
| + | debug: msg=" | ||
| </ | </ | ||
| - | Éditez | + | Modifiez |
| < | < | ||
| - | trainee@ansible:~/.ansible/roles$ vi / | + | [trainee@centos8 roles]$ cp inventory inventory.old |
| - | trainee@ansible: | + | [trainee@centos8 |
| - | --- | + | [trainee@centos8 |
| - | secret: gardezmoisecret | + | postgresql ansible_connection=docker |
| </ | </ | ||
| - | Modifiez | + | Supprimez |
| < | < | ||
| - | trainee@ansible:~/.ansible/roles$ vi playbook.yaml | + | [trainee@centos8 roles]$ rm -rf /home/ |
| - | trainee@ansible:~/ | + | |
| - | --- | + | |
| - | - hosts: all | + | |
| - | tasks: | + | |
| - | - debug: | + | |
| - | msg: "Le secret est {{ secret }}" | + | |
| </ | </ | ||
| Ligne 312: | Ligne 231: | ||
| < | < | ||
| - | trainee@ansible: | + | [trainee@centos8 |
| - | / | + | [DEPRECATION WARNING]: Ansible will require Python 3.8 or newer on the controller starting with Ansible 2.12. Current version: 3.6.8 (default, Sep 10 2021, 09:13:53) [GCC 8.5.0 20210514 (Red Hat 8.5.0-3)]. |
| - | from cryptography.exceptions import InvalidSignature | + | This feature |
| - | PLAY [all] ********************************************************************************************************************************************* | + | PLAY [all] ******************************************************************************************************************************************************************************************************* |
| - | TASK [Gathering Facts] ********************************************************************************************************************************* | + | TASK [Gathering Facts] |
| - | ok: [localhost] | + | ok: [postgresql] |
| - | TASK [debug] ******************************************************************************************************************************************* | + | TASK [message] *************************************************************************************************************************************************************************************************** |
| - | ok: [localhost] => { | + | ok: [postgresql] => { |
| - | " | + | " |
| } | } | ||
| - | PLAY RECAP ********************************************************************************************************************************************* | + | PLAY RECAP ******************************************************************************************************************************************************************************************************* |
| - | localhost | + | postgresql |
| </ | </ | ||
| - | <WRAP center round important 60%> | + | =====LAB #2 - Préparer Windows 10===== |
| - | **Important** : L' | + | |
| - | </ | + | |
| - | ====2.1 - Crypter le Fichier==== | + | Ansible est capable de travailler avec les versions de Windows(tm) suivantes : |
| - | Cryptez maintenant le fichier | + | |
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | * Windows(tm) Server 2016, | ||
| + | * Windows(tm) Server 2019, | ||
| + | * Windows(tm) Server 2022. | ||
| - | < | + | Ansible nécessite sur chaque hôte : |
| - | trainee@ansible:~/ | + | |
| - | / | + | |
| - | from cryptography.exceptions import InvalidSignature | + | |
| - | New Vault password: fenestros | + | |
| - | Confirm New Vault password: fenestros | + | |
| - | Encryption successful | + | |
| - | </ | + | |
| - | <WRAP center round important 60%> | + | * PowerShell 3.0 ou supérieur |
| - | **Important** : Notez que le mot de passe **fenestros** ne sera pas en clair. | + | * Au moins .NET 4.0. |
| - | </ | + | |
| - | <WRAP center round important 60%> | + | ====2.1 |
| - | **Important** : Notez que le mot de passe est pour la commande **ansible-vault** | + | |
| - | </ | + | |
| - | Constatez maintenant le contenu du fichier | + | Afin de mettre à jour les versions de PowerShell et .NET, Ansible fournit un script appelé |
| < | < | ||
| - | trainee@ansible:~/.ansible/roles$ cat /home/ | + | Windows PowerShell |
| - | $ANSIBLE_VAULT; | + | Copyright (C) Microsoft Corporation. Tous droits réservés. |
| - | 30626538653763633464663266313765353138393239613338633165626339346432633831306633 | + | |
| - | 3235323032326163343665653130653131643936613363370a393235333431613135323963303064 | + | Testez le nouveau système multiplateforme PowerShell https://aka.ms/pscore6 |
| - | 64626264663239623030353534303035343738323631653533656433613664613037613434383134 | + | |
| - | 6634653531373732380a393235666361643066383039356434643835353832393364623562316239 | + | PS C: |
| - | 33613933653336333232643930306131313231633565383066646262316638663639 | + | PS C: |
| + | PS C: | ||
| + | PS C: | ||
| + | PS C: | ||
| + | PS C: | ||
| + | PS C: | ||
| + | COMMENTAIRES : | ||
| + | COMMENTAIRES : | ||
| + | COMMENTAIRES : | ||
| </ | </ | ||
| - | Exécutez | + | Au cas où, vous pouvez enlever l' |
| < | < | ||
| - | trainee@ansible:~/ | + | PS C:\Windows\system32> |
| - | / | + | PS C:\Windows\system32> |
| - | from cryptography.exceptions import InvalidSignature | + | PS C:\Windows\system32> |
| - | + | PS C: | |
| - | PLAY [all] ********************************************************************************************************************************************* | + | PS C: |
| - | ERROR! Attempting to decrypt but no vault secrets found | + | PS C: |
| </ | </ | ||
| - | <WRAP center round important 60%> | + | ====2.2 - Configurer WinRM==== |
| - | **Important** : Notez l' | + | |
| - | </ | + | |
| - | Pour indiquer à la commande | + | Pour mettre en place un **listener** WinRM en HTTP et un **listener** WinRM en HTTPS, créer un certificat auto-signé et activer |
| < | < | ||
| - | trainee@ansible:~/ | + | PS C:\Windows\system32> |
| - | /home/ | + | PS C:\Windows\system32> |
| - | from cryptography.exceptions import InvalidSignature | + | PS C:\Windows\system32> |
| - | Vault password: fenestros | + | PS C: |
| + | Self-signed SSL certificate generated; thumbprint: 17502EEEAC259F4C76D0F199A4B803E94E980CAD | ||
| - | PLAY [all] ********************************************************************************************************************************************* | ||
| - | TASK [Gathering Facts] ********************************************************************************************************************************* | + | wxf : http:// |
| - | ok: [localhost] | + | a : http:// |
| + | w : http:// | ||
| + | lang : fr-FR | ||
| + | Address | ||
| + | ReferenceParameters | ||
| - | TASK [debug] ******************************************************************************************************************************************* | + | Ok. |
| - | ok: [localhost] => { | + | |
| - | " | + | |
| - | } | + | |
| - | PLAY RECAP ********************************************************************************************************************************************* | ||
| - | localhost | ||
| - | </ | ||
| - | <WRAP center round important 60%> | ||
| - | **Important** : Notez que le mot de passe **fenestros** ne sera pas en clair. | ||
| - | </ | ||
| - | ====2.2 - Editer le Fichier==== | + | PS C:\Windows\system32> |
| - | + | ||
| - | Pour éditer le fichier, utilisez la sous-commande **edit** de la commande **ansible-vault** | + | |
| - | + | ||
| - | <code> | + | |
| - | trainee@ansible: | + | |
| - | / | + | |
| - | from cryptography.exceptions import InvalidSignature | + | |
| - | Vault password: fenestros | + | |
| </ | </ | ||
| - | <WRAP center round important 60%> | + | ====2.3 - Consulter les Informations sur WinRM==== |
| - | **Important** : Notez que le mot de passe **fenestros** ne sera pas en clair. | + | |
| - | </ | + | |
| - | Le fichier est chargé en mémoire pour édition | + | Pour voir la liste des **listeners** ainsi créés, utilisez la commande suivante |
| < | < | ||
| - | --- | + | PS C:\Windows\system32> |
| - | secret: gardezmoisecret | + | Listener |
| - | ~ | + | |
| - | ~ | + | |
| - | ~ | + | Port = 5985 |
| - | ~ | + | |
| - | ~ | + | |
| - | ~ | + | |
| - | ~ | + | |
| - | ~ | + | |
| - | ~ | + | |
| - | ~ | + | |
| - | ~ | + | |
| - | ~ | + | |
| - | "/ | + | |
| - | </ | + | |
| - | Modifiez le secret et sauvegardez le fichier | + | Listener |
| + | Address = * | ||
| + | Transport = HTTPS | ||
| + | Port = 5986 | ||
| + | Hostname = DESKTOP-1OV5NMP | ||
| + | Enabled = true | ||
| + | URLPrefix = wsman | ||
| + | CertificateThumbprint = 17502EEEAC259F4C76D0F199A4B803E94E980CAD | ||
| + | ListeningOn = 10.0.2.58, 10.29.0.34, 127.0.0.1, | ||
| - | <code> | + | PS C: |
| - | --- | + | |
| - | secret: gardezlesecret | + | |
| - | ~ | + | |
| - | ~ | + | |
| - | ~ | + | |
| - | ~ | + | |
| - | ~ | + | |
| - | ~ | + | |
| - | ~ | + | |
| - | ~ | + | |
| - | ~ | + | |
| - | ~ | + | |
| - | ~ | + | |
| - | ~ | + | |
| - | :x | + | |
| </ | </ | ||
| - | Constatez que le contenu | + | Pour obtenir les informations concernant le certificat, exécutez les commandes suivantes en remplacant |
| < | < | ||
| - | trainee@ansible:~/ | + | PS C:\Windows\system32> |
| - | $ANSIBLE_VAULT; | + | PS C: |
| - | 37616265353436313939616237316635373133353534316237633434633461373963376235313363 | + | |
| - | 6333303263626436366137653630643439626230323732650a393037333030336432326135373834 | + | |
| - | 38626238643938623935343032366231373066356135383661653733653832396437323964363334 | + | |
| - | 3236303738643031390a343834663162626637363765356430313233666535323763616364383732 | + | |
| - | 35643466613032646366313561313062333531306237616662363032353330393530 | + | |
| - | </ | + | |
| - | Exécutez de nouveau la commande **ansible-playbook** avec l' | ||
| - | < | + | PSPath |
| - | trainee@ansible:~/.ansible/ | + | E980CAD |
| - | / | + | PSParentPath |
| - | from cryptography.exceptions import InvalidSignature | + | PSChildName |
| - | Vault password: fenestros | + | PSDrive |
| + | PSProvider | ||
| + | PSIsContainer | ||
| + | EnhancedKeyUsageList | ||
| + | DnsNameList | ||
| + | SendAsTrustedIssuer | ||
| + | EnrollmentPolicyEndPoint : Microsoft.CertificateServices.Commands.EnrollmentEndPointProperty | ||
| + | EnrollmentServerEndPoint : Microsoft.CertificateServices.Commands.EnrollmentEndPointProperty | ||
| + | PolicyId | ||
| + | Archived | ||
| + | Extensions | ||
| + | | ||
| + | FriendlyName | ||
| + | IssuerName | ||
| + | NotAfter | ||
| + | NotBefore | ||
| + | HasPrivateKey | ||
| + | PrivateKey | ||
| + | PublicKey | ||
| + | RawData | ||
| + | SerialNumber | ||
| + | SubjectName | ||
| + | SignatureAlgorithm | ||
| + | Thumbprint | ||
| + | Version | ||
| + | Handle | ||
| + | Issuer | ||
| + | Subject | ||
| - | PLAY [all] ********************************************************************************************************************************************* | ||
| - | TASK [Gathering Facts] ********************************************************************************************************************************* | ||
| - | ok: [localhost] | ||
| - | TASK [debug] ******************************************************************************************************************************************* | + | PS C:\Windows\system32> |
| - | ok: [localhost] => { | + | |
| - | " | + | |
| - | } | + | |
| - | + | ||
| - | PLAY RECAP ********************************************************************************************************************************************* | + | |
| - | localhost | + | |
| </ | </ | ||
| - | <WRAP center round important 60%> | + | Dernièrement pour obtenir des informations concernant |
| - | **Important** : Notez que le mot de passe **fenestros** ne sera pas en clair. | + | |
| - | </ | + | |
| - | ====2.3 - Décrypter le Fichier==== | + | < |
| + | PS C: | ||
| + | Service | ||
| + | RootSDDL | ||
| + | MaxConcurrentOperations | ||
| + | MaxConcurrentOperationsPerUser | ||
| + | EnumerationTimeoutms | ||
| + | MaxConnections | ||
| + | MaxPacketRetrievalTimeSeconds | ||
| + | AllowUnencrypted | ||
| + | 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 | ||
| - | Il est possible de décrypter le fichier en utilisant la sous-commande **decrypt** de la commande **ansible-vault** | + | PS C:\Windows\system32> |
| + | Winrs | ||
| + | AllowRemoteShellAccess = true | ||
| + | IdleTimeout = 7200000 | ||
| + | MaxConcurrentUsers = 2147483647 | ||
| + | MaxShellRunTime = 2147483647 | ||
| + | MaxProcessesPerShell = 2147483647 | ||
| + | MaxMemoryPerShellMB = 2147483647 | ||
| + | MaxShellsPerUser = 2147483647 | ||
| - | <code> | + | PS C: |
| - | trainee@ansible: | + | |
| - | / | + | |
| - | from cryptography.exceptions import InvalidSignature | + | |
| - | Vault password: fenestros | + | |
| - | Decryption successful | + | |
| </ | </ | ||
| - | <WRAP center round important 60%> | + | ====2.4 - Créer un Utilisateur Local pour Ansible==== |
| - | **Important** : Notez que le mot de passe **fenestros** ne sera pas en clair. | + | |
| - | </ | + | |
| - | Constatez que le contenu du fichier **/ | + | Exécutez ensuite la commande suivante |
| < | < | ||
| - | trainee@ansible:~/ | + | PS C:\Windows\system32> |
| - | --- | + | Service |
| - | secret: gardezlesecret | + | RootSDDL = O: |
| + | MaxConcurrentOperations = 4294967295 | ||
| + | MaxConcurrentOperationsPerUser = 1500 | ||
| + | EnumerationTimeoutms = 240000 | ||
| + | MaxConnections = 300 | ||
| + | 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> | ||
| </ | </ | ||
| - | ====2.4 - Utilisation de Mots de Passe Aléatoires==== | + | Dans la fenêtre **Autorisations pour Default**, ajoutez l' |
| + | |||
| + | {{ : | ||
| - | Installez | + | =====LAB #3 - Préparer |
| + | |||
| + | ====3.1 - Installer pywinrm==== | ||
| + | |||
| + | Dans la machine virtuelle | ||
| < | < | ||
| - | trainee@ansible:~/ | + | [trainee@centos8 |
| - | Mot de passe : fenestros | + | Password: fenestros |
| - | root@ansible:~# apt-get | + | |
| - | ... | + | [root@centos8 |
| - | root@ansible:~# exit | + | Collecting pywinrm> |
| - | déconnexion | + | Downloading pywinrm-0.4.2-py2.py3-none-any.whl (44 kB) |
| + | |████████████████████████████████| 44 kB 250 kB/s | ||
| + | Collecting xmltodict | ||
| + | Downloading xmltodict-0.12.0-py2.py3-none-any.whl (9.2 kB) | ||
| + | Requirement already satisfied: requests> | ||
| + | Requirement already satisfied: six in / | ||
| + | Collecting requests-ntlm> | ||
| + | Downloading requests_ntlm-1.1.0-py2.py3-none-any.whl (5.7 kB) | ||
| + | Requirement already satisfied: chardet< | ||
| + | Requirement already satisfied: idna< | ||
| + | Requirement already satisfied: urllib3< | ||
| + | Collecting ntlm-auth> | ||
| + | Downloading ntlm_auth-1.5.0-py2.py3-none-any.whl (29 kB) | ||
| + | Requirement already satisfied: cryptography> | ||
| + | Requirement already satisfied: cffi> | ||
| + | Requirement already satisfied: pycparser in / | ||
| + | Installing collected packages: ntlm-auth, xmltodict, requests-ntlm, | ||
| + | Successfully installed ntlm-auth-1.5.0 pywinrm-0.4.2 requests-ntlm-1.1.0 xmltodict-0.12.0 | ||
| + | WARNING: Running pip as the ' | ||
| </ | </ | ||
| - | Utilisez maintenant la commande | + | Modifiez ensuite le fichier |
| < | < | ||
| - | trainee@ansible:~/.ansible/roles$ pwgen 16 1 | + | [trainee@centos8 ~]$ su - |
| - | Ceiripaht6Fi1aiF | + | Password: fenestros |
| + | [root@centos8 | ||
| + | [root@centos8 ~]# cat / | ||
| + | 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 | ||
| + | ::1 | ||
| + | 10.0.2.45 centos8.ittraining.loc centos8 | ||
| + | 10.0.2.54 web01.i2tch.loc web01 | ||
| + | 10.0.2.55 web02.i2tch.loc web02 | ||
| + | 10.0.2.56 web03.i2tch.loc web03 | ||
| + | 10.0.2.57 web04.i2tch.loc web04 | ||
| + | 10.0.2.52 targeta.i2tch.loc targeta | ||
| + | 10.0.2.53 targetb.i2tch.loc targetb | ||
| + | 10.0.2.58 windows10 | ||
| </ | </ | ||
| - | Utilisez pwgen pour créer un mot de passe aléatoire contenu dans un fichier : | + | ====3.2 - Tester la Configuration==== |
| + | |||
| + | Pour tester la configuration, | ||
| < | < | ||
| - | trainee@ansible:~/ | + | [root@centos8 ~]# exit |
| - | trainee@ansible:~/ | + | logout |
| - | backend.j2 | + | [trainee@centos8 |
| + | [trainee@centos8 | ||
| + | [windows] | ||
| + | windows10 | ||
| - | trainee@ansible:~/ | + | [windows:vars] |
| - | iezeich5ooSheifi | + | ansible_user=trainee |
| + | ansible_password=a39dae707d | ||
| + | ansible_connection=winrm | ||
| + | ansible_winrm_server_cert_validation=ignore | ||
| </ | </ | ||
| - | Utilisez maintenant le mot de passe aléatoire contenu dans le fichier **vault-password** pour crypter le fichier **/ | + | Procédez au test : |
| < | < | ||
| - | trainee@ansible:~/ | + | [trainee@centos8 |
| - | / | + | windows10 | SUCCESS => { |
| - | from cryptography.exceptions import InvalidSignature | + | " |
| - | Encryption successful | + | " |
| + | } | ||
| </ | </ | ||
| - | Constatez le contenu du fichier **/ | + | =====LAB #4 - Travailler avec Ansible et Windows===== |
| - | < | + | ====4.1 - Obtenir les Informations sur Windows 10==== |
| - | trainee@ansible: | + | |
| - | $ANSIBLE_VAULT; | + | |
| - | 64613166306436313464333963336633373133323433303033383131376261343834356136633864 | + | |
| - | 3665663332643735303836323362376662356435616136300a653834336561356361383736396436 | + | |
| - | 63373761333738383637666237613339663637666439303131323862643939613735336534636131 | + | |
| - | 3135653736393065320a646363646239373033613630346362383838633635313734373362366237 | + | |
| - | 36333365376637323336303461613862376638663333646632633135653964346139 | + | |
| - | </ | + | |
| - | Exécutez de nouveau | + | De la même façon qu'avec Linux, il est possible d'utiliser le module |
| < | < | ||
| - | trainee@ansible:~/ | + | [trainee@centos8 |
| - | / | + | windows10 | SUCCESS => { |
| - | from cryptography.exceptions import InvalidSignature | + | " |
| - | + | " | |
| - | PLAY [all] ********************************************************************************************************************************************* | + | " |
| - | + | " | |
| - | TASK [Gathering Facts] ********************************************************************************************************************************* | + | " |
| - | ok: [localhost] | + | " |
| - | + | " | |
| - | TASK [debug] ******************************************************************************************************************************************* | + | " |
| - | ok: [localhost] => { | + | " |
| - | "msg": "Le secret est gardezlesecret" | + | " |
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | | ||
| + | "module_setup": | ||
| + | }, | ||
| + | | ||
| } | } | ||
| - | |||
| - | PLAY RECAP ********************************************************************************************************************************************* | ||
| - | localhost | ||
| </ | </ | ||
| - | =====LAB #3 - Ansible et Docker===== | + | ====4.2 - Exécutez une Commande==== |
| - | ====3.1 - Présentation de Docker==== | + | Créez le PlayBook **command.yml** : |
| - | Docker est une application de virtualisation légère qui utilise des **images** et des **conteneurs**. | + | < |
| + | [trainee@centos8 ~]$ vi command.yml | ||
| + | [trainee@centos8 ~]$ cat command.yml | ||
| + | --- | ||
| + | - name: ipconfig | ||
| + | hosts: windows | ||
| + | tasks: | ||
| + | - name: run ipconfig | ||
| + | win_command: | ||
| + | register: ipconfig | ||
| + | - debug: var=ipconfig | ||
| + | </ | ||
| - | Une **image** est un paquet exécutable contenant tout ce qu'il est nécessaire afin d' | + | Exécutez le PlayBook |
| - | * le code | + | <code> |
| - | * un runtime | + | [trainee@centos8 ~]$ ansible-playbook command.yml -i inventory |
| - | * des bibliothèques, | + | |
| - | * des variables d' | + | |
| - | * des fichiers de configuration | + | |
| - | Un **conteneur** est une instance de l' | + | PLAY [ipconfig] ************************************************************************************************************************************************************************************************** |
| - | Les conteneurs exécutent des applications nativement en utilisant le noyau de la machine hôte. De ce fait les performances d'un conteneur sont supérieures à celles d'une machine virtuelle qui doit passer par un hyperviseur pour accéder aux ressources de la machine hôte : | + | TASK [Gathering Facts] ******************************************************************************************************************************************************************************************* |
| + | ok: [windows10] | ||
| - | Docker existe en deux versions | + | TASK [run ipconfig] |
| + | changed: [windows10] | ||
| - | ====3.2 - Installer docker==== | + | TASK [debug] ***************************************************************************************************************************************************************************************************** |
| + | ok: [windows10] | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | "", | ||
| + | " | ||
| + | "", | ||
| + | "", | ||
| + | "Carte Ethernet Ethernet 2 :", | ||
| + | "", | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | ] | ||
| + | } | ||
| + | } | ||
| - | Docker n'est pas dans le dépôts de Debian. Afin de l' | + | PLAY RECAP ******************************************************************************************************************************************************************************************************* |
| - | + | windows10 | |
| - | < | + | |
| - | trainee@ansible: | + | |
| - | Mot de passe : fenestros | + | |
| - | root@ansible:~# apt-get install -y apt-transport-https ca-certificates curl gnupg2 software-properties-common | + | |
| </ | </ | ||
| - | Téléchargez la clef GPG officielle de docker | + | ====4.3 - Exécuter un script PowerShell==== |
| + | |||
| + | Créez un script PowerShell pour démarrer le service Windows Update | ||
| < | < | ||
| - | root@ansible:~# curl -fsSL https:// | + | [trainee@centos8 |
| - | OK | + | [trainee@centos8 ~]$ cat script1.ps1 |
| + | Start-Service | ||
| </ | </ | ||
| - | Vérifiez que l'ID de la clef est **9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88** : | + | Créez ensuite un PlayBook appelé |
| < | < | ||
| - | root@ansible:~# apt-key fingerprint 0EBFCD88 | + | [trainee@centos8 |
| - | pub | + | [trainee@centos8 ~]$ cat winupdate.yml |
| - | 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88 | + | - name: " |
| - | uid [ unknown] Docker Release (CE deb) < | + | |
| - | sub | + | |
| + | | ||
| + | | ||
| + | script: " | ||
| </ | </ | ||
| - | Ajoutez | + | Exécutez |
| < | < | ||
| - | root@ansible:~# add-apt-repository "deb [arch=amd64] https:// | + | [trainee@centos8 ~]$ ansible-playbook winupdate.yml -i inventory |
| - | </ | + | |
| - | <WRAP center round important> | + | PLAY [PowerShell script] ***************************************************************************************************************************************************************************************** |
| - | **Important** - Notez que la commande | + | |
| - | </ | + | |
| - | Installez maintenant le paquet | + | TASK [Windows Update] |
| + | changed: [windows10] | ||
| - | < | + | PLAY RECAP ******************************************************************************************************************************************************************************************************* |
| - | root@ansible:~# apt-get update | + | windows10 |
| - | ... | + | |
| - | root@ansible: | + | |
| </ | </ | ||
| - | Dernièrement, | + | ====4.4 - Installer un Logiciel avec Chocolatey==== |
| - | < | + | **[[https:// |
| - | root@ansible:~# docker version | + | |
| - | Client: Docker Engine - Community | + | |
| - | | + | |
| - | API version: | + | |
| - | Go version: | + | |
| - | Git commit: | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | Server: Docker Engine - Community | + | Créez le PlayBook |
| - | | + | |
| - | Version: | + | |
| - | API version: | + | |
| - | Go version: | + | |
| - | Git commit: | + | |
| - | Built: | + | |
| - | OS/ | + | |
| - | Experimental: | + | |
| - | | + | |
| - | Version: | + | |
| - | GitCommit: | + | |
| - | | + | |
| - | Version: | + | |
| - | GitCommit: | + | |
| - | | + | |
| - | Version: | + | |
| - | GitCommit: | + | |
| - | </ | + | |
| - | + | ||
| - | <WRAP center round important> | + | |
| - | **Important** - Docker est composé de trois éléments : un serveur, un client et un ou plusieurs **Repositories** ou Dépôts en français. | + | |
| - | </ | + | |
| - | + | ||
| - | Démarrez un conteneur dénommé **postgresql** en mode détaché à partir d'une image **CentOS** : | + | |
| < | < | ||
| - | root@ansible:~# docker run -d --name | + | [trainee@centos8 |
| - | Unable to find image ' | + | [trainee@centos8 ~]$ cat firefox.yml |
| - | latest: Pulling from library/ | + | --- |
| - | 7a0437f04f83: Pull complete | + | - name: Install Firefox using Chocolatey |
| - | Digest: sha256: | + | hosts: all |
| - | Status: Downloaded newer image for centos: | + | tasks: |
| - | f9be86154d1dfaf652d888f478847fbc233ec8984d53a388eb000d2f9dd0344f | + | - name: Install Firefox |
| + | | ||
| + | name: firefox | ||
| + | | ||
| </ | </ | ||
| - | Vérifiez que le conteneur fonctionne | + | Exécutez |
| < | < | ||
| - | root@ansible:~# docker ps -a | + | [trainee@centos8 |
| - | CONTAINER ID IMAGE | + | |
| - | f9be86154d1d | + | |
| - | </ | + | |
| - | ====3.3 - La Connexion à Docker==== | + | PLAY [Install Firefox using Chocolatey] ************************************************************************************************************************************************************************** |
| - | Créez maintenant le Rôle **docker** : | + | TASK [Gathering Facts] |
| + | ok: [windows10] | ||
| - | < | + | TASK [Install Firefox] ******************************************************************************************************************************************************************************************* |
| - | trainee@ansible:~/.ansible/ | + | [WARNING]: Chocolatey was missing from this system, so it was installed during this task run. |
| + | changed: [windows10] | ||
| + | |||
| + | PLAY RECAP ******************************************************************************************************************************************************************************************************* | ||
| + | windows10 | ||
| </ | </ | ||
| - | Modifiez ensuite | + | ====4.5 - Créer un Utilisateur Local==== |
| + | |||
| + | Créez | ||
| < | < | ||
| - | trainee@ansible:~/ | + | [trainee@centos8 |
| - | trainee@ansible:~/ | + | [trainee@centos8 |
| --- | --- | ||
| - | - hosts: | + | - name: Create a user |
| + | | ||
| tasks: | tasks: | ||
| - | - name: message | + | - name: Create Jean |
| - | | + | |
| - | | + | name: jean |
| - | | + | |
| + | | ||
| + | groups: | ||
| + | - utilisateurs | ||
| </ | </ | ||
| - | Modifiez | + | Exécutez |
| < | < | ||
| - | trainee@ansible:~/ | + | [trainee@centos8 |
| - | trainee@ansible:~/.ansible/ | + | |
| - | trainee@ansible: | + | |
| - | postgresql ansible_connection=docker | + | |
| - | </ | + | |
| - | Supprimez le fichier | + | PLAY [Create a user] ********************************************************************************************************************************************************************************************* |
| - | < | + | TASK [Gathering Facts] ******************************************************************************************************************************************************************************************* |
| - | < | + | ok: [windows10] |
| - | trainee@ansible:~/ | + | |
| - | </ | + | |
| - | Exécutez la commande | + | TASK [Create Jean] *********************************************************************************************************************************************************************************************** |
| + | changed: [windows10] | ||
| - | < | + | PLAY RECAP ******************************************************************************************************************************************************************************************************* |
| - | trainee@ansible: | + | windows10 |
| - | Mot de passe : | + | |
| - | root@ansible: | + | |
| - | root@ansible:/ | + | |
| - | + | ||
| - | PLAY [all] ********************************************************************************************************************************************* | + | |
| - | + | ||
| - | TASK [Gathering Facts] | + | |
| - | ok: [postgresql] | + | |
| - | + | ||
| - | TASK [message] ***************************************************************************************************************************************** | + | |
| - | ok: [postgresql] | + | |
| - | " | + | |
| - | } | + | |
| - | + | ||
| - | TASK [install] ***************************************************************************************************************************************** | + | |
| - | changed: [postgresql] | + | |
| - | + | ||
| - | PLAY RECAP ********************************************************************************************************************************************* | + | |
| - | postgresql | + | |
| </ | </ | ||
| - | Vérifiez | + | Vérifiez que le compte |
| - | < | + | {{ :elearning: |
| - | root@ansible:/ | + | |
| - | [root@f9be86154d1d /]# psql --version | + | |
| - | psql (PostgreSQL) 10.15 | + | |
| - | </ | + | |
| ----- | ----- | ||
| - | Copyright © 2022 Hugh Norris. | + | Copyright © 2023 Hugh Norris. |