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:l129:part4 [2020/01/30 03:28] – modification externe 127.0.0.1elearning:workbooks:debian:6:avance:l129:part4 [2022/06/22 08:56] (Version actuelle) admin
Ligne 1: Ligne 1:
 ~~PDF:LANDSCAPE~~ ~~PDF:LANDSCAPE~~
 +
 +Version : **2022.01**
  
 Dernière mise-à-jour : ~~LASTMOD~~ Dernière mise-à-jour : ~~LASTMOD~~
Ligne 5: Ligne 7:
 ======DOF404 - Hiera et Modules====== ======DOF404 - Hiera et Modules======
  
-=====Hiera=====+=====Contenu du Module=====
  
-====Préparation====+  * **DOF404 - Hiera et Modules** 
 +    * Contenu du Module 
 +    * Préparation 
 +    * Hiera 
 +      * Présentation 
 +      * LAB #1 - Environnements 
 +      * LAB #2 -Les Types de Données Hiera 
 +      * LAB #3 - Interpolation 
 +        * Les Sources de Données basées sur des Facts 
 +      * LAB #4 -Créer des Ressources avec les Données d'Hiera 
 +      * LAB #5 - Gérer des Données Secrètes 
 +    * Modules 
 +      * LAB #6 - Installer des Modules 
 +      * LAB #7 - Utilisation des Modules 
 +        * puppetlabs/mysql 
 +        * puppetlabs/apache 
 +        * puppet/archive
  
-===Sous Debian/Ubuntu===+=====Préparation===== 
 + 
 +Re-créez la machine virtuelle Puppet :
  
 <code> <code>
-trainee@puppet:~$ cd puppet-beginners-guide-3 +desktop@serverXX:~$ cd puppet-beginners-guide-3 
-trainee@puppet:~/puppet-beginners-guide-3$ vagrant destroy +desktop@serverXX:~/puppet-beginners-guide-3$ vagrant destroy 
-trainee@puppet:~/puppet-beginners-guide-3$ scripts/start_vagrant.sh +desktop@serverXX:~/puppet-beginners-guide-3$ scripts/start_vagrant.sh 
-trainee@puppet:~/puppet-beginners-guide-3$ vagrant ssh+desktop@serverXX:~/puppet-beginners-guide-3$ vagrant ssh
 </code> </code>
  
-===Sous Windows=== +=====Hiera=====
- +
-Exécutez **cmd** et saisissez les commandes suivantes : +
- +
-<code> +
-Microsoft Windows [version 10.0.16299.431] +
-(c) 2017 Microsoft Corporation. Tous droits réservés. +
- +
-C:\Users\trainee>cd puppet-beginners-guide-3 +
- +
-C:\Users\trainee\puppet-beginners-guide-3>vagrant destroy +
- +
-C:\Users\trainee\puppet-beginners-guide-3>cd scripts +
- +
-C:\Users\trainee\puppet-beginners-guide-3\scripts>start_vagrant.sh +
- +
-C:\Users\trainee\puppet-beginners-guide-3\scripts>vagrant ssh +
-</code>+
  
 ====Présentation==== ====Présentation====
  
-Le manifest suivant stipule la version de l'agent Puppet qui doit être installé sur un noeud :+Le manifest suivant stipule la version de l'agent Puppet qui doit être installé sur un nœud :
  
 <file> <file>
Ligne 47: Ligne 50:
 </file> </file>
  
-Quand une mise à jour devient disponible, ce code doit être trouvé et modifié sur l'ensemble des noeuds. La multiplication de cette tâche pour tous les paquets référencés par les manifests mène à un travail titantesque, compliqué et fastidieux.+Quand une mise à jour devient disponible, ce code doit être trouvé et modifié sur l'ensemble des nœuds. La multiplication de cette tâche pour tous les paquets référencés par les manifests mène à un travail titanesque, compliqué et fastidieux.
  
 Qui plus est, la mise à jour des données dans les manifests ne concerne pas uniquement les paquets mais aussi, par exemple, les : Qui plus est, la mise à jour des données dans les manifests ne concerne pas uniquement les paquets mais aussi, par exemple, les :
Ligne 57: Ligne 60:
   * valeurs des configurations telles la quantité de mémoire allouée à un serveur de base de données.   * valeurs des configurations telles la quantité de mémoire allouée à un serveur de base de données.
  
-Hiera permet de gérer les données indépendamment du code Puppet et de spécifier des valeurs différentes par noeud en fonction, par exemple, du nom d'hôte ou du système d'exploitation. Hiera stocke ces informations dans de simples fichiers texte ayant une extention **.yaml** ( YAML Ain't Markup Language ).+Hiera permet de gérer les données indépendamment du code Puppet et de spécifier des valeurs différentes par noeud en fonction, par exemple, du nom d'hôte ou du système d'exploitation. Hiera stocke ces informations dans de simples fichiers texte ayant une extension **.yaml** ( YAML Ain't Markup Language ).
  
 Puppet peut ensuite consulter les informations en utilisant **lookup** : Puppet peut ensuite consulter les informations en utilisant **lookup** :
Ligne 67: Ligne 70:
 </file> </file>
  
-<WRAP center round important 50%>+<WRAP center round important>
 **Important** - **lookup** a besoin du nom de la clef Hiera, par exemple **backup_path**, ainsi que le type de données, soit **String** dans l'exemple ci-dessus. **Important** - **lookup** a besoin du nom de la clef Hiera, par exemple **backup_path**, ainsi que le type de données, soit **String** dans l'exemple ci-dessus.
 </WRAP> </WRAP>
Ligne 88: Ligne 91:
 </code> </code>
  
-Prenons le cas d'un fichier de configuration hiera.yaml minimalist :+Prenons le cas d'un fichier de configuration hiera.yaml minimaliste :
  
 <file> <file>
Ligne 108: Ligne 111:
  
 <code> <code>
-vagrant@ubuntu-xenial:~$ ls /etc/puppetlabs/code/environments/production+vagrant@ubuntu-xenial:~$ ls /etc/puppetlabs/code/environments/production.sample
 data  environment.conf  hiera.yaml  manifests  modules data  environment.conf  hiera.yaml  manifests  modules
 </code> </code>
  
-====LAB #20 - Environnements====+Copiez **data**, **environment.conf** et **hiera.yaml** du répertoire **/etc/puppetlabs/code/environments/production.sample** vers le répertoire **/etc/puppetlabs/code/environments/production** : 
 + 
 +<code> 
 +vagrant@ubuntu-xenial:/etc/puppetlabs/code/environments/production.sample$ sudo cp -r data  environment.conf  hiera.yaml /etc/puppetlabs/code/environments/production 
 +vagrant@ubuntu-xenial:/etc/puppetlabs/code/environments/production.sample$ cd ../production 
 +vagrant@ubuntu-xenial:/etc/puppetlabs/code/environments/production$ ls 
 +data  environment.conf  files  hiera.yaml  manifests  README.md 
 +vagrant@ubuntu-xenial:/etc/puppetlabs/code/environments/production$ cd ~ 
 +vagrant@ubuntu-xenial:~$  
 +</code> 
 + 
 +====LAB #- Environnements====
  
 Un environnement est un répertoire contenant : Un environnement est un répertoire contenant :
Ligne 124: Ligne 138:
 vagrant@ubuntu-xenial:~$ sudo puppet lookup --environment pbg test vagrant@ubuntu-xenial:~$ sudo puppet lookup --environment pbg test
 --- This is a test --- This is a test
-... 
 </code> </code>
  
Ligne 147: Ligne 160:
 Notice: Scope(Class[main]): Apache is set to use 100 workers Notice: Scope(Class[main]): Apache is set to use 100 workers
 Notice: Scope(Class[main]): dns_allow_query enabled:  true Notice: Scope(Class[main]): dns_allow_query enabled:  true
-Notice: Compiled catalog for ubuntu-xenial in environment pbg in 0.18 seconds +Notice: Compiled catalog for ubuntu-xenial in environment pbg in 0.03 seconds 
-Notice: Applied catalog in 0.03 seconds+Notice: Applied catalog in 0.01 seconds
 </code> </code>
  
Ligne 154: Ligne 167:
  
 <code> <code>
-vagrant@ubuntu-xenial:~$ cat /etc/puppetlabs/code/environments/pbg/data/common.yaml +vagrant@ubuntu-xenial:~$ cat /etc/puppetlabs/code/environments/pbg/data/common.yaml
 --- ---
   test: 'This is a test'   test: 'This is a test'
Ligne 246: Ligne 259:
  
 <code> <code>
-vagrant@ubuntu-xenial:~$ ls /etc/puppetlabs/code/environments/production/ 
-data  environment.conf  hiera.yaml  manifests  modules 
 vagrant@ubuntu-xenial:~$ ls /etc/puppetlabs/code/environments/production/data vagrant@ubuntu-xenial:~$ ls /etc/puppetlabs/code/environments/production/data
 vagrant@ubuntu-xenial:~$ vagrant@ubuntu-xenial:~$
 </code> </code>
  
-====LAB #21 -Les Types de Données Hiera====+====LAB #-Les Types de Données Hiera====
  
 Dans le fichier **/etc/puppetlabs/code/environments/pbg/data/common.yaml**, on peut constater trois types de données : Dans le fichier **/etc/puppetlabs/code/environments/pbg/data/common.yaml**, on peut constater trois types de données :
Ligne 261: Ligne 272:
  
 <code> <code>
-vagrant@ubuntu-xenial:~$ cat /etc/puppetlabs/code/environments/pbg/data/common.yaml +vagrant@ubuntu-xenial:~$ cat /etc/puppetlabs/code/environments/pbg/data/common.yaml
 --- ---
   test: 'This is a test'   test: 'This is a test'
Ligne 283: Ligne 294:
   backup_retention_days: 10   backup_retention_days: 10
   backup_path: "/backup/%{facts.hostname}"   backup_path: "/backup/%{facts.hostname}"
-...+  ips: 
 +    home: '130.190.0.1' 
 +    office1: '74.12.203.14' 
 +    office2: '95.170.0.75' 
 +  firewall_allow_list: 
 +    - "%{lookup('ips.home')}" 
 +    - "%{lookup('ips.office1')}" 
 +    - "%{lookup('ips.office2')}" 
 +  vpn_allow_list: "%{alias('firewall_allow_list')}" 
 +  cms_parameters: 
 +    static: 
 +      sites_root: '/var/www/sites' 
 +      assets_root: 'files' 
 +      web_root: 'public_html' 
 +    laravel: 
 +      sites_root: '/var/www/sites' 
 +      assets_root: 'public_html/files' 
 +      web_root: 'current/public' 
 +  force_www_rewrite: 
 +    comment: "Force WWW" 
 +    rewrite_cond: "%{literal('%')}{HTTP_HOST} !^www\\. [NC]" 
 +    rewrite_rule: "^(.*)$ https://www.%{literal('%')}{HTTP_HOST}%{literal('%')}{REQUEST_URI} [R=301,L]" 
 +  users: 
 +    - 'katy' 
 +    - 'lark' 
 +    - 'bridget' 
 +    - 'hsing-hui' 
 +    - 'charles' 
 +  users2: 
 +    'katy': 
 +      ensure: present 
 +      uid: 1900 
 +      shell: '/bin/bash' 
 +    'lark': 
 +      ensure: present 
 +      uid: 1901 
 +      shell: '/bin/sh' 
 +    'bridget': 
 +      ensure: present 
 +      uid: 1902 
 +      shell: '/bin/bash' 
 +    'hsing-hui': 
 +      ensure: present 
 +      uid: 1903 
 +      shell: '/bin/sh' 
 +    'charles': 
 +      ensure: present 
 +      uid: 1904 
 +      shell: '/bin/bash' 
 +  mysql::server::root_password: 'hairline-quotient-inside-tableful' 
 +  mysql::server::remove_default_accounts: true 
 +  apache::default_vhost: false 
 +  pbg_ntp_params::version: 'latest' 
 +  pbg_ntp_params2::start_at_boot: true 
 +  pbg_ntp_params2::version: 'latest' 
 +  pbg_ntp_params2::service_state: 'running'
 </code> </code>
  
Ligne 310: Ligne 376:
 </file> </file>
  
-<WRAP center round important 50%>+<WRAP center round important>
 **Important** - Une valeur booléenne doit être soit **true**, soit **false**. **Important** - Une valeur booléenne doit être soit **true**, soit **false**.
 </WRAP> </WRAP>
Ligne 338: Ligne 404:
 </file> </file>
  
-Chaque clef du Hash possède son propre nom et est indéntée par rapport à la première ligne.+Chaque clef du Hash possède son propre nom et est indentée par rapport à la première ligne.
  
 Pour mieux comprendre, créez le fichier **lookup_hash.pp** : Pour mieux comprendre, créez le fichier **lookup_hash.pp** :
Ligne 360: Ligne 426:
 vagrant@ubuntu-xenial:~$ sudo puppet apply --environment pbg lookup_hash.pp vagrant@ubuntu-xenial:~$ sudo puppet apply --environment pbg lookup_hash.pp
 Notice: Scope(Class[main]): pxe_just_once is enabled Notice: Scope(Class[main]): pxe_just_once is enabled
-Notice: Compiled catalog for ubuntu-xenial in environment pbg in 0.20 seconds +Notice: Compiled catalog for ubuntu-xenial in environment pbg in 0.02 seconds 
-Notice: Applied catalog in 0.04 seconds+Notice: Applied catalog in 0.01 seconds
 </code> </code>
  
Ligne 378: Ligne 444:
 vagrant@ubuntu-xenial:~$ sudo puppet apply --environment pbg lookup_hash_dot.pp vagrant@ubuntu-xenial:~$ sudo puppet apply --environment pbg lookup_hash_dot.pp
 Notice: Scope(Class[main]): web_root is public_html Notice: Scope(Class[main]): web_root is public_html
-Notice: Compiled catalog for ubuntu-xenial in environment pbg in 0.15 seconds +Notice: Compiled catalog for ubuntu-xenial in environment pbg in 0.03 seconds 
-Notice: Applied catalog in 0.04 seconds+Notice: Applied catalog in 0.01 seconds
 </code> </code>
  
Ligne 394: Ligne 460:
 </file> </file>
  
-====LAB #22 - Interpolation====+====LAB #- Interpolation====
  
 L'interpolation est l'action d'introduire dans un texte un élément qui n'était pas dans l'original. Avec Puppet et Hiera ceci concerne : L'interpolation est l'action d'introduire dans un texte un élément qui n'était pas dans l'original. Avec Puppet et Hiera ceci concerne :
Ligne 431: Ligne 497:
 </code> </code>
    
-<WRAP center round important 50%>+<WRAP center round important>
 **Important** - La priorité des sources est descendante. Si la valeur d'une clef est spécifiée dans deux sources et les valeurs sont différentes, Hiera recherche dans les sources de données dans l'ordre de leur apparition dans le fichier **hiera.yaml** et retourne par défaut la **première** valeur retrouvée.  **Important** - La priorité des sources est descendante. Si la valeur d'une clef est spécifiée dans deux sources et les valeurs sont différentes, Hiera recherche dans les sources de données dans l'ordre de leur apparition dans le fichier **hiera.yaml** et retourne par défaut la **première** valeur retrouvée. 
 </WRAP> </WRAP>
Ligne 449: Ligne 515:
   * **Hash Merge** - retourne un Hash contenant toutes les clefs et toutes les valeurs correspondantes qui correspondent à la recherche,   * **Hash Merge** - retourne un Hash contenant toutes les clefs et toutes les valeurs correspondantes qui correspondent à la recherche,
   * **Shallow Merge** - si Hiera retrouve deux Hash avec le même nom, il retourne uniquement le premier Hash,   * **Shallow Merge** - si Hiera retrouve deux Hash avec le même nom, il retourne uniquement le premier Hash,
-  * **Deep merge** - permet de considerer le Hash entoer et non seulement que le premier niveau.+  * **Deep merge** - permet de considérer le Hash entier et non seulement que le premier niveau.
  
-==Les Sources de Données basées sur des Facts==+===Les Sources de Données basées sur des Facts===
  
 Revenons au fichier **/etc/puppetlabs/code/environments/pbg/hiera.yaml** : Revenons au fichier **/etc/puppetlabs/code/environments/pbg/hiera.yaml** :
Ligne 491: Ligne 557:
 </file> </file>
  
-Ces deux lignes permettent d'avoir une configuration différente par noeud contenue dans un fichier dénommé <nom d'hôte>.yaml.+Ces deux lignes permettent d'avoir une configuration différente par nœud contenue dans un fichier dénommé <nom d'hôte>.yaml.
  
 De même les deux lignes suivantes : De même les deux lignes suivantes :
Ligne 504: Ligne 570:
 permettent une configuration différente par version du système d'exploitation. permettent une configuration différente par version du système d'exploitation.
  
-====LAB #23 -Créer des Ressources avec le Données d'Hiera====+====LAB #-Créer des Ressources avec les Données d'Hiera====
  
 Commencez par créer le fichier **hiera_users.pp** : Commencez par créer le fichier **hiera_users.pp** :
Ligne 535: Ligne 601:
 <code> <code>
 vagrant@ubuntu-xenial:~$ sudo puppet apply --environment pbg hiera_users.pp vagrant@ubuntu-xenial:~$ sudo puppet apply --environment pbg hiera_users.pp
-Notice: Compiled catalog for ubuntu-xenial in environment pbg in 0.19 seconds+Notice: Compiled catalog for ubuntu-xenial in environment pbg in 0.04 seconds
 Notice: /Stage[main]/Main/User[katy]/ensure: created Notice: /Stage[main]/Main/User[katy]/ensure: created
 Notice: /Stage[main]/Main/User[lark]/ensure: created Notice: /Stage[main]/Main/User[lark]/ensure: created
Ligne 541: Ligne 607:
 Notice: /Stage[main]/Main/User[hsing-hui]/ensure: created Notice: /Stage[main]/Main/User[hsing-hui]/ensure: created
 Notice: /Stage[main]/Main/User[charles]/ensure: created Notice: /Stage[main]/Main/User[charles]/ensure: created
-Notice: Applied catalog in 0.66 seconds+Notice: Applied catalog in 0.14 seconds
 </code> </code>
  
Ligne 588: Ligne 654:
 <code> <code>
 vagrant@ubuntu-xenial:~$ sudo puppet apply --environment pbg hiera_users2.pp vagrant@ubuntu-xenial:~$ sudo puppet apply --environment pbg hiera_users2.pp
-Notice: Compiled catalog for ubuntu-xenial in environment pbg in 0.18 seconds+Notice: Compiled catalog for ubuntu-xenial in environment pbg in 0.03 seconds
 Notice: /Stage[main]/Main/User[katy]/uid: uid changed 1002 to 1900 Notice: /Stage[main]/Main/User[katy]/uid: uid changed 1002 to 1900
 Notice: /Stage[main]/Main/User[katy]/shell: shell changed '' to '/bin/bash' Notice: /Stage[main]/Main/User[katy]/shell: shell changed '' to '/bin/bash'
Ligne 599: Ligne 665:
 Notice: /Stage[main]/Main/User[charles]/uid: uid changed 1006 to 1904 Notice: /Stage[main]/Main/User[charles]/uid: uid changed 1006 to 1904
 Notice: /Stage[main]/Main/User[charles]/shell: shell changed '' to '/bin/bash' Notice: /Stage[main]/Main/User[charles]/shell: shell changed '' to '/bin/bash'
-Notice: Applied catalog in 0.80 seconds+Notice: Applied catalog in 0.17 seconds
 </code> </code>
  
-Consultez maintenant le fichier **/etc/passwd** :+Consultez maintenant la fin du fichier **/etc/passwd** :
  
 <code> <code>
-vagrant@ubuntu-xenial:~$ cat /etc/passwd +vagrant@ubuntu-xenial:~$ tail /etc/passwd
-root:x:0:0:root:/root:/bin/bash +
-daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin +
-bin:x:2:2:bin:/bin:/usr/sbin/nologin +
-sys:x:3:3:sys:/dev:/usr/sbin/nologin +
-sync:x:4:65534:sync:/bin:/bin/sync +
-games:x:5:60:games:/usr/games:/usr/sbin/nologin +
-man:x:6:12:man:/var/cache/man:/usr/sbin/nologin +
-lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin +
-mail:x:8:8:mail:/var/mail:/usr/sbin/nologin +
-news:x:9:9:news:/var/spool/news:/usr/sbin/nologin +
-uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin +
-proxy:x:13:13:proxy:/bin:/usr/sbin/nologin +
-www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin +
-backup:x:34:34:backup:/var/backups:/usr/sbin/nologin +
-list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin +
-irc:x:39:39:ircd:/var/run/ircd:/usr/sbin/nologin +
-gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/usr/sbin/nologin +
-nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin +
-systemd-timesync:x:100:102:systemd Time Synchronization,,,:/run/systemd:/bin/false +
-systemd-network:x:101:103:systemd Network Management,,,:/run/systemd/netif:/bin/false +
-systemd-resolve:x:102:104:systemd Resolver,,,:/run/systemd/resolve:/bin/false +
-systemd-bus-proxy:x:103:105:systemd Bus Proxy,,,:/run/systemd:/bin/false +
-syslog:x:104:108::/home/syslog:/bin/false +
-_apt:x:105:65534::/nonexistent:/bin/false +
-lxd:x:106:65534::/var/lib/lxd/:/bin/false +
-messagebus:x:107:111::/var/run/dbus:/bin/false +
-uuidd:x:108:112::/run/uuidd:/bin/false +
-dnsmasq:x:109:65534:dnsmasq,,,:/var/lib/misc:/bin/false +
-sshd:x:110:65534::/var/run/sshd:/usr/sbin/nologin+
 pollinate:x:111:1::/var/cache/pollinate:/bin/false pollinate:x:111:1::/var/cache/pollinate:/bin/false
 vagrant:x:1000:1000:,,,:/home/vagrant:/bin/bash vagrant:x:1000:1000:,,,:/home/vagrant:/bin/bash
 ubuntu:x:1001:1001:Ubuntu:/home/ubuntu:/bin/bash ubuntu:x:1001:1001:Ubuntu:/home/ubuntu:/bin/bash
 vboxadd:x:999:1::/var/run/vboxadd:/bin/false vboxadd:x:999:1::/var/run/vboxadd:/bin/false
 +ntp:x:112:116::/home/ntp:/bin/false
 katy:x:1900:1002::/home/katy:/bin/bash katy:x:1900:1002::/home/katy:/bin/bash
 lark:x:1901:1003::/home/lark:/bin/sh lark:x:1901:1003::/home/lark:/bin/sh
Ligne 646: Ligne 684:
 </code> </code>
  
-====LAB #24 - Gérer des Données Secrètes====+====LAB #- Gérer des Données Secrètes====
  
 Souvent Puppet a besoin d'informations sensibles telles : Souvent Puppet a besoin d'informations sensibles telles :
Ligne 662: Ligne 700:
 Building dependency tree        Building dependency tree       
 Reading state information... Done Reading state information... Done
-gnupg is already the newest version (1.4.20-1ubuntu3.1).+gnupg is already the newest version (1.4.20-1ubuntu3.3).
 The following NEW packages will be installed: The following NEW packages will be installed:
   rng-tools   rng-tools
-0 upgraded, 1 newly installed, 0 to remove and not upgraded.+0 upgraded, 1 newly installed, 0 to remove and not upgraded.
 Need to get 21.9 kB of archives. Need to get 21.9 kB of archives.
 After this operation, 139 kB of additional disk space will be used. After this operation, 139 kB of additional disk space will be used.
 Get:1 http://archive.ubuntu.com/ubuntu xenial/universe amd64 rng-tools amd64 5-0ubuntu3 [21.9 kB] Get:1 http://archive.ubuntu.com/ubuntu xenial/universe amd64 rng-tools amd64 5-0ubuntu3 [21.9 kB]
-Fetched 21.9 kB in 0s (64.kB/s)+Fetched 21.9 kB in 0s (76.kB/s)    
 Selecting previously unselected package rng-tools. Selecting previously unselected package rng-tools.
-(Reading database ... 67016 files and directories currently installed.)+(Reading database ... 74569 files and directories currently installed.)
 Preparing to unpack .../rng-tools_5-0ubuntu3_amd64.deb ... Preparing to unpack .../rng-tools_5-0ubuntu3_amd64.deb ...
 Unpacking rng-tools (5-0ubuntu3) ... Unpacking rng-tools (5-0ubuntu3) ...
 Processing triggers for man-db (2.7.5-1) ... Processing triggers for man-db (2.7.5-1) ...
-Processing triggers for systemd (229-4ubuntu21.2) ... +Processing triggers for ureadahead (0.100.0-19.1) ... 
-Processing triggers for ureadahead (0.100.0-19) ...+Processing triggers for systemd (229-4ubuntu21.23) ...
 Setting up rng-tools (5-0ubuntu3) ... Setting up rng-tools (5-0ubuntu3) ...
-Processing triggers for systemd (229-4ubuntu21.2) ... +Processing triggers for ureadahead (0.100.0-19.1) ... 
-Processing triggers for ureadahead (0.100.0-19) ...+Processing triggers for systemd (229-4ubuntu21.23) ... 
 +</code> 
 + 
 +Si la version installée de ruby est inférieure à la 2.5.0, mettez à jour ruby : 
 + 
 +<code> 
 +vagrant@ubuntu-xenial:~$ wget -O ruby-install-0.8.3.tar.gz https://github.com/postmodern/ruby-install/archive/v0.8.3.tar.gz 
 +vagrant@ubuntu-xenial:~$ tar -xzvf ruby-install-0.8.3.tar.gz 
 +vagrant@ubuntu-xenial:~$ cd ruby-install-0.8.3/ 
 +vagrant@ubuntu-xenial:~$ sudo make install 
 +vagrant@ubuntu-xenial:~$ sudo ruby-install ruby 2.5.1 
 +</code> 
 + 
 +Installez ensuite le support gpg pour Hiera : 
 + 
 +<code> 
 +vagrant@ubuntu-xenial:~$ sudo gem install hiera-eyaml-gpg
 </code> </code>
  
Ligne 726: Ligne 780:
 Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? o Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? o
 You need a Passphrase to protect your secret key. You need a Passphrase to protect your secret key.
 +
 +NE METTEZ PAS DE PASSPHRASE. APPUYEZ SIMPLEMENT SUR [ENTREE] <------------------------------------ATTENTION
  
 You don't want a passphrase - this is probably a *bad* idea! You don't want a passphrase - this is probably a *bad* idea!
Ligne 735: Ligne 791:
 disks) during the prime generation; this gives the random number disks) during the prime generation; this gives the random number
 generator a better chance to gain enough entropy. generator a better chance to gain enough entropy.
-++++++.+++++
 .+++++ .+++++
 We need to generate a lot of random bytes. It is a good idea to perform We need to generate a lot of random bytes. It is a good idea to perform
Ligne 741: Ligne 797:
 disks) during the prime generation; this gives the random number disks) during the prime generation; this gives the random number
 generator a better chance to gain enough entropy. generator a better chance to gain enough entropy.
-.....+++++ +.+++++ 
-++++++..+++++
 gpg: /home/vagrant/.gnupg/trustdb.gpg: trustdb created gpg: /home/vagrant/.gnupg/trustdb.gpg: trustdb created
-gpg: key 05205AF4 marked as ultimately trusted+gpg: key D327661B marked as ultimately trusted
 public and secret key created and signed. public and secret key created and signed.
  
Ligne 750: Ligne 806:
 gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
 gpg: depth: 0  valid:    signed:    trust: 0-, 0q, 0n, 0m, 0f, 1u gpg: depth: 0  valid:    signed:    trust: 0-, 0q, 0n, 0m, 0f, 1u
-pub   2048R/05205AF4 2018-06-03 +pub   2048R/D327661B 2020-02-12 
-      Key fingerprint = 804C 7675 2822 6E73 6C4E  E0D4 1280 D1A2 0520 5AF4+      Key fingerprint = 38E1 5B5E EBDF F39F F49B  ED2A 9646 8A98 D327 661B
 uid                  puppet <puppet@i2tch.co.uk> uid                  puppet <puppet@i2tch.co.uk>
-sub   2048R/F72F4F77 2018-06-03+sub   2048R/73C27290 2020-02-12
 </code> </code>
  
Ligne 759: Ligne 815:
  
 <file> <file>
-pub   2048R/05205AF4 2018-06-03 +pub   2048R/D327661B 2020-02-12 
-      Key fingerprint = 804C 7675 2822 6E73 6C4E  E0D4 1280 D1A2 0520 5AF4+      Key fingerprint = 38E1 5B5E EBDF F39F F49B  ED2A 9646 8A98 D327 661B
 uid                  puppet <puppet@i2tch.co.uk> uid                  puppet <puppet@i2tch.co.uk>
-sub   2048R/F72F4F77 2018-06-03+sub   2048R/73C27290 2020-02-12
 </file> </file>
  
 Editez le fichier **/etc/puppetlabs/code/environments/pbg/hiera.yaml** ainsi : Editez le fichier **/etc/puppetlabs/code/environments/pbg/hiera.yaml** ainsi :
- 
-<file> 
-... 
-   gpg_gnupghome: '/home/vagrant/.gnupg' 
-... 
-</file> 
- 
-Vous obtiendrez : 
  
 <code> <code>
-vagrant@ubuntu-xenial:~$ sudo vi /etc/puppetlabs/code/environments/pbg/hiera.yaml+vagrant@ubuntu-xenial:~$ vi /etc/puppetlabs/code/environments/pbg/hiera.yaml 
 +vagrant@ubuntu-xenial:~$ cat /etc/puppetlabs/code/environments/pbg/hiera.yaml
 --- ---
 version: 5 version: 5
Ligne 823: Ligne 872:
  
 <code> <code>
-vagrant@ubuntu-xenial:~$ sudo /opt/puppetlabs/puppet/lib/ruby/vendor_gems/gems/hiera-eyaml-3.0.0/bin/eyaml edit --gpg-always-trust --gpg-recipients=puppet@i2tch.co.uk /etc/puppetlabs/code/environments/pbg/data/secret.eyaml+vagrant@ubuntu-xenial:~$ sudo eyaml edit --gpg-always-trust --gpg-recipients=puppet@i2tch.co.uk /etc/puppetlabs/code/environments/pbg/data/secret.eyaml
 [hiera-eyaml-core] /etc/puppetlabs/code/environment/pbg/data/secret.yaml doesn't exist, editing new file [hiera-eyaml-core] /etc/puppetlabs/code/environment/pbg/data/secret.yaml doesn't exist, editing new file
  
Ligne 835: Ligne 884:
 </code> </code>
  
-<WRAP center round important 50%>+<WRAP center round important>
 **Important** - Utilisez l'adresse email saisie lors de l'exécution de la commande **gpg --gen-key**.  **Important** - Utilisez l'adresse email saisie lors de l'exécution de la commande **gpg --gen-key**. 
 </WRAP> </WRAP>
Ligne 855: Ligne 904:
 </file> </file>
  
-Editez ce fichier ainsi et sauvegardez-le :+Éditez ce fichier ainsi et sauvegardez-le :
  
 <file> <file>
Ligne 877: Ligne 926:
  
 <code> <code>
-vagrant@ubuntu-xenial:~$ cat /etc/puppetlabs/code/environments/pbg/data/secret.eyaml--- +vagrant@ubuntu-xenial:~$ cat /etc/puppetlabs/code/environments/pbg/data/secret.eyaml 
- test_secret: ENC[GPG,hQEMAwMDMyr3L093AQf/ZVi+EVd2w0bVl76p1WA7wTwFnKx47jE7smq2DI/r/KmDzKisukiSxtbRm4A60FIOf5aZIkuXLHiOKWE64w4Gk1riBn7GECLRNcKKZjvwZEebsh6qvnPA41kbTNYNNbNIhjDTlTzrIGjM/YvPVi8Fb4LPFJNJTZtXV8l0vYw0YBJZ8jDazFI+VNSLaH8ttiU3LuUZlWMTHtB3coSCOAUEPXGKYxIrwOcOSUAFHtNSEGAzbikMSEMmEaoHfJCEKHQ5DyitGFL8o1Esl6A0df1/LJiHOYiDtHx/xjvVBtz6uK0MNHUP10eJi6lKmtxBr1N0wactfqQVvQnbI9chcrbACNJSAch1zZb3AsU5afdJQON520OyDdGDhdetHu2jx6pZKqQUb3i8BcD9X6WVAiva0OgcFSEmKigFpdLRpAMVRNQ0yej1OsYLJaQTWgRT3ddEySl4Lw==]+--- 
 + test_secret: ENC[GPG,hQEMA5MfXRRzwnKQAQf/fRBVVlz42D4cIHMtZmyUhNE8Kxdzn+lAsTfu7a8NbbN0NfNmYcCZxWr2h0rVoEdQKUiMdawr5kwsMMU1aGbWb0GH5LDwde8XXxDnr4dnACevG5G/UJkhhsc8cpfJSk9yCyb0rGu9dM8/PJuh768p5xwVslu5lQkNE5gVx14Vh2xMqyqio2DUhWbKphzw234GBK9g9Eys2ucsi/aRJtAgxz4N0eD/+E2xsaBBTXr4rOZ1SXUlLGflS6opaOkFb5WTdUoGReP0YxFOd6hhysL9fltHYAgBzvP06BUvlmvnC4QqAy+q3z7Xj65NyRpvGYoLTrkoaSav650DaoqklsQ5D9JSAbt1nI/TZCjJiPqT6vKPPcDs2Y4kvOA6KKWMR1G32cBicWc9+sWiDtO2NxJrf4noI6rujmmZUnRkkd9eCWnUtIvSgb3G55Y965e6Pl110jlPpw==]
 --- ---
 </code> </code>
  
-<WRAP center round important 50%>+<WRAP center round important>
 **Important** - **ENC** indique à Hiera que ce fichier est crypté. GPG indique à Hiera quel type de cryptage.  **Important** - **ENC** indique à Hiera que ce fichier est crypté. GPG indique à Hiera quel type de cryptage. 
 </WRAP> </WRAP>
Ligne 891: Ligne 941:
 vagrant@ubuntu-xenial:~$ sudo puppet lookup --environment pbg test_secret vagrant@ubuntu-xenial:~$ sudo puppet lookup --environment pbg test_secret
 --- This is a test secret --- This is a test secret
-... 
 </code> </code>
  
Ligne 900: Ligne 949:
 vagrant@ubuntu-xenial:~$ cat eyaml_edit.sh vagrant@ubuntu-xenial:~$ cat eyaml_edit.sh
 #!/bin/bash #!/bin/bash
-/opt/puppetlabs/puppet/lib/ruby/vendor_gems/gems/hiera-eyaml-2.1.0/bin/eyaml edit --gpg-always-trust --gpg-recipients=puppet@i2tch.co.uk /etc/puppetlabs/code/environments/pbg/data/secret.eyaml+eyaml edit --gpg-always-trust --gpg-recipients=puppet@i2tch.co.uk /etc/puppetlabs/code/environments/pbg/data/secret.eyaml
 </code> </code>
  
-<WRAP center round important 50%>+<WRAP center round important>
 **Important** - Utilisez l'adresse email saisie lors de l'exécution de la commande **gpg --gen-key**.  **Important** - Utilisez l'adresse email saisie lors de l'exécution de la commande **gpg --gen-key**. 
 </WRAP> </WRAP>
Ligne 916: Ligne 965:
  
 <code> <code>
-vagrant@ubuntu-xenial:~$ ls -l /usr/local/bin/eyaml_edit.sh  +vagrant@ubuntu-xenial:~$ ls -l /usr/local/bin/eyaml_edit.sh 
--rw-r--r-- 1 root root 205 Jun  3 12:04 /usr/local/bin/eyaml_edit.sh +-rw-r--r-- 1 root root 134 Feb 12 09:37 /usr/local/bin/eyaml_edit.sh 
-vagrant@ubuntu-xenial:~$ sudo chmod u+x /usr/local/bin/eyaml_edit.sh  +vagrant@ubuntu-xenial:~$ sudo chmod u+x /usr/local/bin/eyaml_edit.sh 
-vagrant@ubuntu-xenial:~$ ls -l /usr/local/bin/eyaml_edit.sh  +vagrant@ubuntu-xenial:~$ ls -l /usr/local/bin/eyaml_edit.sh 
--rwxr--r-- 1 root root 205 Jun  3 12:04 /usr/local/bin/eyaml_edit.sh+-rwxr--r-- 1 root root 134 Feb 12 09:37 /usr/local/bin/eyaml_edit.sh
 </code> </code>
  
Ligne 948: Ligne 997:
 </file> </file>
  
-<WRAP center round important 50%+<WRAP center round important> 
-**Important** - Notez la modification de la ligne **test_secret: DEC::GPG[This is a test secret]!** en **test_secret: DEC(1)::GPG[This is a test secret]!**. Le numéro indique que le secret est existant et non un nouveau secret. +**Important** - Notez la modification automatique de la ligne **test_secret: DEC::GPG[This is a test secret]!** en **test_secret: DEC(1)::GPG[This is a test secret]!**. Le numéro indique que le secret est existant et non un nouveau secret. 
 </WRAP> </WRAP>
  
-Ajoutez maintenant un dexième secret :+Ajoutez maintenant un deuxième secret :
  
 <file> <file>
Ligne 974: Ligne 1023:
  
 <code> <code>
-vagrant@ubuntu-xenial:~$ sudo puppet lookup --environment pbg new_secret--- Somebody wakes up +vagrant@ubuntu-xenial:~$ sudo puppet lookup --environment pbg new_secret 
-...+--- Somebody wakes up
 </code> </code>
  
-Dernièrement il faut copier la clef GPG a chaque noeud. Pour exporter la clef, utilisez la commande suivante :+Dernièrement il faut copier la clef GPG a chaque nœud. Pour exporter la clef, utilisez la commande suivante :
  
 <code> <code>
Ligne 992: Ligne 1041:
 Version: GnuPG v1 Version: GnuPG v1
  
-lQOYBFsTw6ABCADdkb6Ev1lqztqgNGBebDq0frW79ncPT6n4fqUFT7OBBIqLdBeY +lQOYBF5DvOEBCADjpHyyFInVw5v+2kWYnlWxYny5LAz4jdJIU4IhJtpBpOivU5GE 
-Ysd7kmaxBK0cWxIopBHUme5KA/BZ/tO2Wr6VzKBnvW7xxy++TFTsK3Iza9QVXqZR +P6X7u7izFfOclByUtPQuJlFKDzuXgCPXpH31Ifx0HCMdhM3SR1mNc+kWI65eQ23q 
-aAJR1NEA5KqZo3iSeMIeq8E60hs1cX4EKwi+5+4zAph2K1HPkLl+S+R7JKazEIVR +CCPd3d3t9dYjW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CXlyryjm94HHVRGy0+jnxZNEX8j4nW37ulyW6sHElUZFdhPDMdb8vZIyy3JYI
-=QW+0+=UwyQ
 -----END PGP PRIVATE KEY BLOCK----- -----END PGP PRIVATE KEY BLOCK-----
 </code> </code>
  
-Sur les autres neouds, importez la clef :+Sur les autres nœuds, importez la clef :
  
 <file> <file>
-# sudo gpgp --import key.txt+# sudo gpg --import key.txt
 </file> </file>
  
Ligne 1085: Ligne 1134:
 Les modules sont regroupés en deux groupes : Les modules sont regroupés en deux groupes :
  
-  * **Supported** - les modules beneficient du support de Puppet,+  * **Supported** - les modules bénéficient du support de Puppet,
     * URL - **[[https://forge.puppet.com/modules?endorsements=supported]]**,     * URL - **[[https://forge.puppet.com/modules?endorsements=supported]]**,
-  * **Approved** - les modules ne beneficient pas du support de Puppet mais il sont approuvés par ce dernier pour l'utilisation dont ils ont été conçus,+  * **Approved** - les modules ne bénéficient pas du support de Puppet mais il sont approuvés par ce dernier pour l'utilisation dont ils ont été conçus,
     * URL - **[[https://forge.puppet.com/modules?endorsements=approved]]**.     * URL - **[[https://forge.puppet.com/modules?endorsements=approved]]**.
  
-====LAB #25 - Installer des Modules====+====LAB #- Installer des Modules====
  
 Le gestionnaire de modules de Puppet s'appelle **r10k**. Le gestionnaire utilise un fichier qui s'appelle **Puppetfile** qui se trouve dans le répertoire de l'environnement : Le gestionnaire de modules de Puppet s'appelle **r10k**. Le gestionnaire utilise un fichier qui s'appelle **Puppetfile** qui se trouve dans le répertoire de l'environnement :
Ligne 1098: Ligne 1147:
 vagrant@ubuntu-xenial:/etc/puppetlabs/code/environments/pbg$ ls vagrant@ubuntu-xenial:/etc/puppetlabs/code/environments/pbg$ ls
 data  hiera.yaml  Puppetfile data  hiera.yaml  Puppetfile
-vagrant@ubuntu-xenial:/etc/puppetlabs/code/environments/pbg$ cat Puppetfile +vagrant@ubuntu-xenial:/etc/puppetlabs/code/environments/pbg$ cat Puppetfile
 forge 'http://forge.puppetlabs.com' forge 'http://forge.puppetlabs.com'
  
Ligne 1121: Ligne 1170:
  
   * la variable **forge** spécifie le repository à utiliser,   * la variable **forge** spécifie le repository à utiliser,
-  * la variable **mod** specifie le nom et la version du module à installer.+  * la variable **mod** spécifie le nom et la version du module à installer. 
 + 
 +Supprimez les trois dernières lignes du fichier **Puppetfile** : 
 + 
 +<code> 
 +vagrant@ubuntu-xenial:/etc/puppetlabs/code/environments/pbg$ vi Puppetfile 
 +vagrant@ubuntu-xenial:/etc/puppetlabs/code/environments/pbg$ cat Puppetfile 
 +forge 'http://forge.puppetlabs.com' 
 + 
 +mod 'garethr/docker', '5.3.0' 
 +mod 'puppet/archive', '1.3.0' 
 +mod 'puppet/staging', '2.2.0' 
 +mod 'puppetlabs/apache', '2.0.0' 
 +mod 'puppetlabs/apt', '3.0.0' 
 +mod 'puppetlabs/aws', '2.0.0' 
 +mod 'puppetlabs/concat', '4.0.1' 
 +mod 'puppetlabs/docker_platform', '2.2.1' 
 +mod 'puppetlabs/mysql', '3.11.0' 
 +mod 'puppetlabs/stdlib', '4.17.1' 
 +mod 'stahnma/epel', '1.2.2' 
 +</code>
  
 Exécutez la commande suivante pour que le gestionnaire traite ce fichier : Exécutez la commande suivante pour que le gestionnaire traite ce fichier :
Ligne 1127: Ligne 1196:
 <code> <code>
 vagrant@ubuntu-xenial:/etc/puppetlabs/code/environments/pbg$ sudo r10k puppetfile install --verbose vagrant@ubuntu-xenial:/etc/puppetlabs/code/environments/pbg$ sudo r10k puppetfile install --verbose
 +INFO -> Using Puppetfile '/etc/puppetlabs/code/environments/pbg/Puppetfile'
 INFO -> Updating module /etc/puppetlabs/code/environments/pbg/modules/docker INFO -> Updating module /etc/puppetlabs/code/environments/pbg/modules/docker
 +WARN -> Puppet Forge module 'garethr-docker' has been deprecated, visit https://forge.puppet.com/garethr/docker for more information.
 INFO -> Updating module /etc/puppetlabs/code/environments/pbg/modules/archive INFO -> Updating module /etc/puppetlabs/code/environments/pbg/modules/archive
 INFO -> Updating module /etc/puppetlabs/code/environments/pbg/modules/staging INFO -> Updating module /etc/puppetlabs/code/environments/pbg/modules/staging
 +WARN -> Puppet Forge module 'puppet-staging' has been deprecated, visit https://forge.puppet.com/puppet/staging for more information.
 INFO -> Updating module /etc/puppetlabs/code/environments/pbg/modules/apache INFO -> Updating module /etc/puppetlabs/code/environments/pbg/modules/apache
 INFO -> Updating module /etc/puppetlabs/code/environments/pbg/modules/apt INFO -> Updating module /etc/puppetlabs/code/environments/pbg/modules/apt
Ligne 1139: Ligne 1211:
 INFO -> Updating module /etc/puppetlabs/code/environments/pbg/modules/stdlib INFO -> Updating module /etc/puppetlabs/code/environments/pbg/modules/stdlib
 INFO -> Updating module /etc/puppetlabs/code/environments/pbg/modules/epel INFO -> Updating module /etc/puppetlabs/code/environments/pbg/modules/epel
-INFO -> Updating module /etc/puppetlabs/code/environments/pbg/modules/pbg_ntp 
 </code> </code>
  
-Pour tester si le module **stdlib** a été correctement installé, exécutez la commande suivante :+Pour tester si le module **stdlib** est correctement installé, exécutez la commande suivante :
  
 <code> <code>
 vagrant@ubuntu-xenial:/etc/puppetlabs/code/environments/pbg$ sudo puppet apply --environment pbg -e "notice(upcase('hello'))" vagrant@ubuntu-xenial:/etc/puppetlabs/code/environments/pbg$ sudo puppet apply --environment pbg -e "notice(upcase('hello'))"
 Notice: Scope(Class[main]): HELLO Notice: Scope(Class[main]): HELLO
-Notice: Compiled catalog for ubuntu-xenial in environment pbg in 0.14 seconds +Notice: Compiled catalog for ubuntu-xenial in environment pbg in 0.01 seconds 
-Notice: Applied catalog in 0.04 seconds+Notice: Applied catalog in 0.01 seconds
 </code> </code>
  
-<WRAP center round important 50%>+<WRAP center round important>
 **Important** - La fonction **upcase** fait partie du module **stdlib**.  **Important** - La fonction **upcase** fait partie du module **stdlib**. 
 </WRAP> </WRAP>
Ligne 1161: Ligne 1232:
 Fetching: colorize-0.8.1.gem (100%) Fetching: colorize-0.8.1.gem (100%)
 Successfully installed colorize-0.8.1 Successfully installed colorize-0.8.1
-Fetching: generate-puppetfile-1.0.0.gem (100%) +Fetching: generate-puppetfile-1.1.0.gem (100%) 
-Successfully installed generate-puppetfile-1.0.0+Successfully installed generate-puppetfile-1.1.0
 Parsing documentation for colorize-0.8.1 Parsing documentation for colorize-0.8.1
 Installing ri documentation for colorize-0.8.1 Installing ri documentation for colorize-0.8.1
-Parsing documentation for generate-puppetfile-1.0.0 +Parsing documentation for generate-puppetfile-1.1.0 
-Installing ri documentation for generate-puppetfile-1.0.0 +Installing ri documentation for generate-puppetfile-1.1.0 
-Done installing documentation for colorize, generate-puppetfile after seconds+Done installing documentation for colorize, generate-puppetfile after seconds
 2 gems installed 2 gems installed
 </code> </code>
  
-Utilisez maintenant ce Gem pour générer le puppetfile pour le module **docker_platform** :+Installez le paquet **ruby-dev** : 
 + 
 +<code> 
 +vagrant@ubuntu-xenial:/etc/puppetlabs/code/environments/pbg$ sudo apt install ruby-dev 
 +</code> 
 + 
 +Utilisez maintenant le Gem **generate-puppetfile** pour générer le puppetfile pour le module **docker_platform** :
  
 <code> <code>
-vagrant@ubuntu-xenial:/etc/puppetlabs/code/environments/pbg$ sudo /opt/puppetlabs/puppet/lib/ruby/gems/2.4.0/gems/generate-puppetfile-1.0.0/bin/generate-puppetfile puppetlabs/docker_platform+vagrant@ubuntu-xenial:/etc/puppetlabs/code/environments/pbg$ generate-puppetfile puppetlabs/docker_platform
  
 Installing modules. This may take a few minutes. Installing modules. This may take a few minutes.
Ligne 1189: Ligne 1266:
 mod 'puppetlabs/docker_platform', '2.2.1' mod 'puppetlabs/docker_platform', '2.2.1'
 mod 'puppetlabs/stdlib',          '4.25.1' mod 'puppetlabs/stdlib',          '4.25.1'
-mod 'stahnma/epel',               '1.3.0'+mod 'stahnma/epel',               '1.3.1'
 ======================================================================= =======================================================================
 </code> </code>
Ligne 1196: Ligne 1273:
  
 <code> <code>
-vagrant@ubuntu-xenial:/etc/puppetlabs/code/environments/pbg$ sudo /opt/puppetlabs/puppet/lib/ruby/gems/2.4.0/gems/generate-puppetfile-1.0.0/bin/generate-puppetfile -p /etc/puppetlabs/code/environments/pbg/Puppetfile+vagrant@ubuntu-xenial:/etc/puppetlabs/code/environments/pbg$ sudo generate-puppetfile -p /etc/puppetlabs/code/environments/pbg/Puppetfile
  
 Installing modules. This may take a few minutes. Installing modules. This may take a few minutes.
Ligne 1208: Ligne 1285:
 # Modules discovered by generate-puppetfile # Modules discovered by generate-puppetfile
 mod 'garethr/docker',             '5.3.0' mod 'garethr/docker',             '5.3.0'
-mod 'puppet/archive',             '3.0.0'+mod 'puppet/archive',             '4.4.0'
 mod 'puppet/staging',             '3.2.0' mod 'puppet/staging',             '3.2.0'
-mod 'puppetlabs/apache',          '3.1.0'+mod 'puppetlabs/apache',          '5.4.0'
 mod 'puppetlabs/apt',             '3.0.0' mod 'puppetlabs/apt',             '3.0.0'
 mod 'puppetlabs/aws',             '2.1.0' mod 'puppetlabs/aws',             '2.1.0'
-mod 'puppetlabs/concat',          '4.2.1'+mod 'puppetlabs/concat',          '6.2.0'
 mod 'puppetlabs/docker_platform', '2.2.1' mod 'puppetlabs/docker_platform', '2.2.1'
-mod 'puppetlabs/mysql',           '5.4.0'+mod 'puppetlabs/mysql',           '10.3.0'
 mod 'puppetlabs/stdlib',          '4.25.1' mod 'puppetlabs/stdlib',          '4.25.1'
-mod 'puppetlabs/translate',       '1.1.0' +mod 'puppetlabs/translate',       '2.1.0' 
-mod 'stahnma/epel',               '1.3.0' +mod 'stahnma/epel',               '1.3.1'
-# Discovered elements from existing Puppetfile +
-mod 'pbg_ntp', +
-  :git => 'https://github.com/bitfield/pbg_ntp.git', +
-  :tag => '0.1.4'+
 ======================================================================= =======================================================================
 </code> </code>
Ligne 1229: Ligne 1302:
  
 <code> <code>
-vagrant@ubuntu-xenial:/etc/puppetlabs/code/environments/pbg$ cat Puppetfile +vagrant@ubuntu-xenial:/etc/puppetlabs/code/environments/pbg$ cat Puppetfile
 forge 'http://forge.puppetlabs.com' forge 'http://forge.puppetlabs.com'
  
Ligne 1243: Ligne 1316:
 mod 'puppetlabs/stdlib', '4.17.1' mod 'puppetlabs/stdlib', '4.17.1'
 mod 'stahnma/epel', '1.2.2' mod 'stahnma/epel', '1.2.2'
- 
-mod 'pbg_ntp', 
-  :git => 'https://github.com/bitfield/pbg_ntp.git', 
-  :tag => '0.1.4' 
 </code> </code>
  
Ligne 1252: Ligne 1321:
  
 <code> <code>
-vagrant@ubuntu-xenial:/etc/puppetlabs/code/environments/pbg$ sudo vi Puppetfile +vagrant@ubuntu-xenial:/etc/puppetlabs/code/environments/pbg$ sudo vi Puppetfile  
-vagrant@ubuntu-xenial:/etc/puppetlabs/code/environments/pbg$ cat Puppetfile+vagrant@ubuntu-xenial:/etc/puppetlabs/code/environments/pbg$ cat Puppetfile 
 forge 'https://forge.puppet.com' forge 'https://forge.puppet.com'
  
 # Modules discovered by generate-puppetfile # Modules discovered by generate-puppetfile
 mod 'garethr/docker',             '5.3.0' mod 'garethr/docker',             '5.3.0'
-mod 'puppet/archive',             '3.0.0'+mod 'puppet/archive',             '4.4.0'
 mod 'puppet/staging',             '3.2.0' mod 'puppet/staging',             '3.2.0'
-mod 'puppetlabs/apache',          '3.1.0'+mod 'puppetlabs/apache',          '5.4.0'
 mod 'puppetlabs/apt',             '3.0.0' mod 'puppetlabs/apt',             '3.0.0'
 mod 'puppetlabs/aws',             '2.1.0' mod 'puppetlabs/aws',             '2.1.0'
-mod 'puppetlabs/concat',          '4.2.1'+mod 'puppetlabs/concat',          '6.2.0'
 mod 'puppetlabs/docker_platform', '2.2.1' mod 'puppetlabs/docker_platform', '2.2.1'
-mod 'puppetlabs/mysql',           '5.4.0'+mod 'puppetlabs/mysql',           '10.3.0'
 mod 'puppetlabs/stdlib',          '4.25.1' mod 'puppetlabs/stdlib',          '4.25.1'
-mod 'puppetlabs/translate',       '1.1.0' +mod 'puppetlabs/translate',       '2.1.0' 
-mod 'stahnma/epel',               '1.3.0' +mod 'stahnma/epel',               '1.3.1'
-# Discovered elements from existing Puppetfile +
-mod 'pbg_ntp', +
-  :git => 'https://github.com/bitfield/pbg_ntp.git', +
-  :tag => '0.1.4'+
 </code> </code>
  
Ligne 1279: Ligne 1344:
 <code> <code>
 vagrant@ubuntu-xenial:/etc/puppetlabs/code/environments/pbg$ sudo r10k puppetfile install --verbose vagrant@ubuntu-xenial:/etc/puppetlabs/code/environments/pbg$ sudo r10k puppetfile install --verbose
 +INFO -> Using Puppetfile '/etc/puppetlabs/code/environments/pbg/Puppetfile'
 INFO -> Updating module /etc/puppetlabs/code/environments/pbg/modules/docker INFO -> Updating module /etc/puppetlabs/code/environments/pbg/modules/docker
 INFO -> Updating module /etc/puppetlabs/code/environments/pbg/modules/archive INFO -> Updating module /etc/puppetlabs/code/environments/pbg/modules/archive
 INFO -> Updating module /etc/puppetlabs/code/environments/pbg/modules/staging INFO -> Updating module /etc/puppetlabs/code/environments/pbg/modules/staging
 +WARN -> Puppet Forge module 'puppet-staging' has been deprecated, visit https://forge.puppet.com/puppet/staging for more information.
 INFO -> Updating module /etc/puppetlabs/code/environments/pbg/modules/apache INFO -> Updating module /etc/puppetlabs/code/environments/pbg/modules/apache
 INFO -> Updating module /etc/puppetlabs/code/environments/pbg/modules/apt INFO -> Updating module /etc/puppetlabs/code/environments/pbg/modules/apt
Ligne 1291: Ligne 1358:
 INFO -> Updating module /etc/puppetlabs/code/environments/pbg/modules/translate INFO -> Updating module /etc/puppetlabs/code/environments/pbg/modules/translate
 INFO -> Updating module /etc/puppetlabs/code/environments/pbg/modules/epel INFO -> Updating module /etc/puppetlabs/code/environments/pbg/modules/epel
-INFO -> Updating module /etc/puppetlabs/code/environments/pbg/modules/pbg_ntp 
 </code> </code>
  
-====LAB #26 - Utilisation des Modules====+====LAB #- Utilisation des Modules====
  
 ===puppetlabs/mysql=== ===puppetlabs/mysql===
Ligne 1337: Ligne 1403:
 </code> </code>
  
-<WRAP center round important 50%>+<WRAP center round important>
 **Important** - Le mot de passe de root pour MySQL **hairline-quotient-inside-tableful** est ici en clair. En production, ce mot de passe serait crypté comme nous avons déjà vu. **Important** - Le mot de passe de root pour MySQL **hairline-quotient-inside-tableful** est ici en clair. En production, ce mot de passe serait crypté comme nous avons déjà vu.
 </WRAP> </WRAP>
Ligne 1352: Ligne 1418:
 </file> </file>
  
-<WRAP center round important 50%>+<WRAP center round important>
 **Important** - Le nom de la ressource **cat_pictures** est le nom de la base de données. Les attributs **user**, **password**, **host** et **grant** indiquent que l'utilisateur **greebo** peut se connecter à MySQL à partir du **localhost** en utilisant le mot de passe **tabby** et qu'il aura les privilèges **SELECT** et **UPDATE** sur la base de données **cat-pictures**. **Important** - Le nom de la ressource **cat_pictures** est le nom de la base de données. Les attributs **user**, **password**, **host** et **grant** indiquent que l'utilisateur **greebo** peut se connecter à MySQL à partir du **localhost** en utilisant le mot de passe **tabby** et qu'il aura les privilèges **SELECT** et **UPDATE** sur la base de données **cat-pictures**.
 </WRAP> </WRAP>
Ligne 1359: Ligne 1425:
  
 <code> <code>
-vagrant@ubuntu-xenial:~$ sudo puppet apply --environment=pbg module_mysql.pp  +vagrant@ubuntu-xenial:~$ sudo puppet apply --environment=pbg module_mysql.pp 
-Notice: Compiled catalog for ubuntu-xenial.ief2i.fr in environment pbg in 4.49 seconds+Notice: Compiled catalog for ubuntu-xenial in environment pbg in 0.38 seconds 
 +Notice: /Stage[main]/Mysql::Server::Config/File[/etc/mysql]/ensure: created 
 +Notice: /Stage[main]/Mysql::Server::Config/File[/etc/mysql/conf.d]/ensure: created 
 +Notice: /Stage[main]/Mysql::Server::Config/File[mysql-config-file]/ensure: defined content as '{md5}3cb51becc6dc4533c36b0212cba6091b'
 Notice: /Stage[main]/Mysql::Server::Install/Package[mysql-server]/ensure: created Notice: /Stage[main]/Mysql::Server::Install/Package[mysql-server]/ensure: created
-Notice: /Stage[main]/Mysql::Server::Config/File[mysql-config-file]/ensure: defined content as '{md5}44e7aa974ab98260d7d013a2087f1c77' 
 Notice: /Stage[main]/Mysql::Server::Root_password/Mysql_user[root@localhost]/password_hash: changed password Notice: /Stage[main]/Mysql::Server::Root_password/Mysql_user[root@localhost]/password_hash: changed password
 Notice: /Stage[main]/Mysql::Server::Root_password/File[/root/.my.cnf]/ensure: defined content as '{md5}4bb1978026fab523a39a7fd27e4e39c2' Notice: /Stage[main]/Mysql::Server::Root_password/File[/root/.my.cnf]/ensure: defined content as '{md5}4bb1978026fab523a39a7fd27e4e39c2'
Ligne 1369: Ligne 1437:
 Notice: /Stage[main]/Main/Mysql::Db[cat_pictures]/Mysql_user[greebo@localhost]/ensure: created Notice: /Stage[main]/Main/Mysql::Db[cat_pictures]/Mysql_user[greebo@localhost]/ensure: created
 Notice: /Stage[main]/Main/Mysql::Db[cat_pictures]/Mysql_grant[greebo@localhost/cat_pictures.*]/ensure: created Notice: /Stage[main]/Main/Mysql::Db[cat_pictures]/Mysql_grant[greebo@localhost/cat_pictures.*]/ensure: created
-Notice: Applied catalog in 270.54 seconds+Notice: Applied catalog in 32.59 seconds
 </code> </code>
  
Ligne 1379: Ligne 1447:
 Welcome to the MySQL monitor.  Commands end with ; or \g. Welcome to the MySQL monitor.  Commands end with ; or \g.
 Your MySQL connection id is 26 Your MySQL connection id is 26
-Server version: 5.7.22-0ubuntu0.16.04.1 (Ubuntu)+Server version: 5.7.29-0ubuntu0.16.04.1 (Ubuntu)
  
-Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.+Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
  
 Oracle is a registered trademark of Oracle Corporation and/or its Oracle is a registered trademark of Oracle Corporation and/or its
Ligne 1396: Ligne 1464:
 | cat_pictures       | | cat_pictures       |
 +--------------------+ +--------------------+
-2 rows in set (0.01 sec)+2 rows in set (0.00 sec)
  
 mysql> USE cat_pictures; mysql> USE cat_pictures;
Ligne 1402: Ligne 1470:
 mysql> exit mysql> exit
 Bye Bye
-vagrant@ubuntu-xenial:~$  
 </code> </code>
  
Ligne 1422: Ligne 1489:
  
 file { '/var/www/cat-pictures/index.html': file { '/var/www/cat-pictures/index.html':
-  content => "<img src='http://bitfieldconsulting.com/files/happycat.jpg'>",+  content => "<img src='https://3.bp.blogspot.com/-w1McqyQflFM/VUEsrgAphKI/AAAAAAAAAdY/lbMsugNdGto/s1600/why-do-cats-purr-happycat.jpg'>",
   owner   => 'www-data',   owner   => 'www-data',
   group   => 'www-data',   group   => 'www-data',
Ligne 1450: Ligne 1517:
 </code> </code>
  
-<WRAP center round important 50%>+<WRAP center round important>
 **Important** - **apache::default_vhost: false** désactive l'hôte virtuel de la page de test d'Apache. **Important** - **apache::default_vhost: false** désactive l'hôte virtuel de la page de test d'Apache.
 </WRAP> </WRAP>
Ligne 1465: Ligne 1532:
 </file> </file>
  
-<WRAP center round important 50%>+<WRAP center round important>
 **Important** - Le nom de la ressource **cat-pictures.com** est le nom de domaine de l'hôte virtuel. Les attributs **port**, **docroot**, **docroot_owner** et **docroot_group** indiquent que l'hôte virtuel écoute sur le port **80**, que les pages à servir par apache se trouvent dans le répertoire **/var/www/cat-pictures** et que ce répertoire appartient à l'utilisateur **www-data** et est associé avec le groupe **www-data** . **Important** - Le nom de la ressource **cat-pictures.com** est le nom de domaine de l'hôte virtuel. Les attributs **port**, **docroot**, **docroot_owner** et **docroot_group** indiquent que l'hôte virtuel écoute sur le port **80**, que les pages à servir par apache se trouvent dans le répertoire **/var/www/cat-pictures** et que ce répertoire appartient à l'utilisateur **www-data** et est associé avec le groupe **www-data** .
 </WRAP> </WRAP>
Ligne 1473: Ligne 1540:
 <file> <file>
 file { '/var/www/cat-pictures/index.html': file { '/var/www/cat-pictures/index.html':
-  content => "<img src='http://bitfieldconsulting.com/files/happycat.jpg'>",+  content => "<img src='https://3.bp.blogspot.com/-w1McqyQflFM/VUEsrgAphKI/AAAAAAAAAdY/lbMsugNdGto/s1600/why-do-cats-purr-happycat.jpg'>",
   owner   => 'www-data',   owner   => 'www-data',
   group   => 'www-data',   group   => 'www-data',
Ligne 1479: Ligne 1546:
 </file> </file>
  
-<WRAP center round important 50%+<WRAP center round important> 
-**Important** - Cette ressource crée le fichier **/var/www/cat-pictures/index.html** appartenant à l'utilisateur **www-data**, étant associé au groupe **www-data** et ayant un contenu de **<img src='http://bitfieldconsulting.com/files/happycat.jpg'>** .+**Important** - Cette ressource crée le fichier **/var/www/cat-pictures/index.html** appartenant à l'utilisateur **www-data**, étant associé au groupe **www-data** et ayant un contenu de **<img src='https://3.bp.blogspot.com/-w1McqyQflFM/VUEsrgAphKI/AAAAAAAAAdY/lbMsugNdGto/s1600/why-do-cats-purr-happycat.jpg'>** .
 </WRAP> </WRAP>
  
Ligne 1487: Ligne 1554:
 <code> <code>
 vagrant@ubuntu-xenial:~$ sudo puppet apply --environment=pbg module_apache.pp vagrant@ubuntu-xenial:~$ sudo puppet apply --environment=pbg module_apache.pp
-Notice: Compiled catalog for ubuntu-xenial.ief2i.fr in environment pbg in 7.55 seconds+Notice: Compiled catalog for ubuntu-xenial in environment pbg in 0.98 seconds
 Notice: /Stage[main]/Apache/Package[httpd]/ensure: created Notice: /Stage[main]/Apache/Package[httpd]/ensure: created
 Notice: /Stage[main]/Apache/Exec[mkdir /etc/apache2/conf.d]/returns: executed successfully Notice: /Stage[main]/Apache/Exec[mkdir /etc/apache2/conf.d]/returns: executed successfully
-Notice: /Stage[main]/Apache/File[/etc/apache2/sites-available/000-default.conf]/ensure: removed +...
-Notice: /Stage[main]/Apache/File[/etc/apache2/sites-available/default-ssl.conf]/ensure: removed +
-Notice: /Stage[main]/Apache/File[/etc/apache2/sites-enabled/000-default.conf]/ensure: removed +
-Notice: /Stage[main]/Apache::Mod::Reqtimeout/File[reqtimeout.conf]/content: content changed '{md5}40b45155afb3d14263d12e6fc4a98513' to '{md5}81c51851ab7ee7942bef389dc7c0e985' +
-Notice: /Stage[main]/Apache::Mod::Alias/File[alias.conf]/content: content changed '{md5}c6e9f26152898c38e58211c8b362d5c3' to '{md5}cb528041df274fb077800a8e2e64f94e' +
-Notice: /Stage[main]/Apache::Mod::Autoindex/File[autoindex.conf]/content: content changed '{md5}bfba7d77669e02b869b92e98215d58fc' to '{md5}2421a3c6df32c7e38c2a7a22afdf5728' +
-Notice: /Stage[main]/Apache::Mod::Deflate/File[deflate.conf]/content: content changed '{md5}6649a32153b9afdc53f6898b5a10a2d6' to '{md5}a045d750d819b1e9dae3fbfb3f20edd5' +
-Notice: /Stage[main]/Apache::Mod::Dir/File[dir.conf]/content: content changed '{md5}fe4bc5fa3b3cc7a241fe57f8fabc55a1' to '{md5}c741d8ea840e6eb999d739eed47c69d7' +
-Notice: /Stage[main]/Apache::Mod::Mime/File[mime.conf]/content: content changed '{md5}7369c2fd5edf2192edbd6d865b632ae5' to '{md5}9da85e58f3bd6c780ce76db603b7f028' +
-Notice: /Stage[main]/Apache::Mod::Negotiation/File[negotiation.conf]/content: content changed '{md5}443398efdd41085bc1a70047f6e61c95' to '{md5}47284b5580b986a6ba32580b6ffb9fd7' +
-Notice: /Stage[main]/Apache::Mod::Setenvif/File[setenvif.conf]/content: content changed '{md5}533f5f92761c2c24d6820f1d7d1c45ad' to '{md5}c7ede4173da1915b7ec088201f030c28' +
-Notice: /Stage[main]/Apache::Mod::Worker/File[/etc/apache2/mods-available/worker.conf]/ensure: defined content as '{md5}1e3caf54ba0d71f3502b6cce6cda38d8' +
-Notice: /Stage[main]/Apache/Concat[/etc/apache2/ports.conf]/File[/etc/apache2/ports.conf]/content: content changed '{md5}a961f23471d985c2b819b652b7f64321' to '{md5}334fa5cddbf9a408ea1ca7a1666b1fc4' +
-Notice: /Stage[main]/Apache/File[/etc/apache2/apache2.conf]/content: content changed '{md5}da32fcc6a783acaebf0d74c17c726bf7' to '{md5}f0bb70225191ce965d8c3e8ae992ba4c' +
-Notice: /Stage[main]/Apache::Default_mods/Apache::Mod[authz_host]/File[authz_host.load]/content: content changed '{md5}f529587409471e3feb62256bccaf538a' to '{md5}4b8162e3e3a58d1dc2222e2ad352bd93' +
-Notice: /Stage[main]/Apache::Default_mods/Apache::Mod[authz_host]/File[authz_host.load symlink]/target: target changed '../mods-available/authz_host.load' to '/etc/apache2/mods-available/authz_host.load' +
-Notice: /Stage[main]/Apache::Mod::Authn_core/Apache::Mod[authn_core]/File[authn_core.load symlink]/target: target changed '../mods-available/authn_core.load' to '/etc/apache2/mods-available/authn_core.load' +
-Notice: /Stage[main]/Apache::Mod::Reqtimeout/Apache::Mod[reqtimeout]/File[reqtimeout.load symlink]/ensure: created +
-Notice: /Stage[main]/Apache::Mod::Reqtimeout/Apache::Mod[reqtimeout]/File[reqtimeout.conf symlink]/ensure: created +
-Notice: /Stage[main]/Apache::Mod::Alias/Apache::Mod[alias]/File[alias.load symlink]/target: target changed '../mods-available/alias.load' to '/etc/apache2/mods-available/alias.load' +
-Notice: /Stage[main]/Apache::Mod::Alias/Apache::Mod[alias]/File[alias.conf symlink]/target: target changed '../mods-available/alias.conf' to '/etc/apache2/mods-available/alias.conf' +
-Notice: /Stage[main]/Apache::Mod::Authn_file/Apache::Mod[authn_file]/File[authn_file.load symlink]/target: target changed '../mods-available/authn_file.load' to '/etc/apache2/mods-available/authn_file.load' +
-Notice: /Stage[main]/Apache::Mod::Autoindex/Apache::Mod[autoindex]/File[autoindex.load symlink]/target: target changed '../mods-available/autoindex.load' to '/etc/apache2/mods-available/autoindex.load' +
-Notice: /Stage[main]/Apache::Mod::Autoindex/Apache::Mod[autoindex]/File[autoindex.conf symlink]/target: target changed '../mods-available/autoindex.conf' to '/etc/apache2/mods-available/autoindex.conf' +
-Notice: /Stage[main]/Apache::Mod::Dav/Apache::Mod[dav]/File[dav.load symlink]/ensure: created +
-Notice: /Stage[main]/Apache::Mod::Dav_fs/File[dav_fs.conf]/content: content changed '{md5}162db96239f13b5416f369b6306d9db6' to '{md5}e36e2951cff0d4df331652ca6fccdb77' +
-Notice: /Stage[main]/Apache::Mod::Dav_fs/Apache::Mod[dav_fs]/File[dav_fs.load]/content: content changed '{md5}17f662fd023dbaaab9d89f9a11ae58c1' to '{md5}3fa14d6e9f9d8eb25d09ed4823508f6d' +
-Notice: /Stage[main]/Apache::Mod::Dav_fs/Apache::Mod[dav_fs]/File[dav_fs.load symlink]/ensure: created +
-Notice: /Stage[main]/Apache::Mod::Dav_fs/Apache::Mod[dav_fs]/File[dav_fs.conf symlink]/ensure: created +
-Notice: /Stage[main]/Apache::Mod::Deflate/Apache::Mod[deflate]/File[deflate.load]/content: content changed '{md5}6a7a23153796456ee919abdf728fd972' to '{md5}ac4540dd672556b07f900425751f745c' +
-Notice: /Stage[main]/Apache::Mod::Deflate/Apache::Mod[deflate]/File[deflate.load symlink]/target: target changed '../mods-available/deflate.load' to '/etc/apache2/mods-available/deflate.load' +
-Notice: /Stage[main]/Apache::Mod::Deflate/Apache::Mod[deflate]/File[deflate.conf symlink]/target: target changed '../mods-available/deflate.conf' to '/etc/apache2/mods-available/deflate.conf' +
-Notice: /Stage[main]/Apache::Mod::Dir/Apache::Mod[dir]/File[dir.load symlink]/target: target changed '../mods-available/dir.load' to '/etc/apache2/mods-available/dir.load' +
-Notice: /Stage[main]/Apache::Mod::Dir/Apache::Mod[dir]/File[dir.conf symlink]/target: target changed '../mods-available/dir.conf' to '/etc/apache2/mods-available/dir.conf' +
-Notice: /Stage[main]/Apache::Mod::Mime/Apache::Mod[mime]/File[mime.load symlink]/target: target changed '../mods-available/mime.load' to '/etc/apache2/mods-available/mime.load' +
-Notice: /Stage[main]/Apache::Mod::Mime/Apache::Mod[mime]/File[mime.conf symlink]/target: target changed '../mods-available/mime.conf' to '/etc/apache2/mods-available/mime.conf' +
-Notice: /Stage[main]/Apache::Mod::Negotiation/Apache::Mod[negotiation]/File[negotiation.load symlink]/target: target changed '../mods-available/negotiation.load' to '/etc/apache2/mods-available/negotiation.load' +
-Notice: /Stage[main]/Apache::Mod::Negotiation/Apache::Mod[negotiation]/File[negotiation.conf symlink]/target: target changed '../mods-available/negotiation.conf' to '/etc/apache2/mods-available/negotiation.conf' +
-Notice: /Stage[main]/Apache::Mod::Setenvif/Apache::Mod[setenvif]/File[setenvif.load symlink]/target: target changed '../mods-available/setenvif.load' to '/etc/apache2/mods-available/setenvif.load' +
-Notice: /Stage[main]/Apache::Mod::Setenvif/Apache::Mod[setenvif]/File[setenvif.conf symlink]/target: target changed '../mods-available/setenvif.conf' to '/etc/apache2/mods-available/setenvif.conf' +
-Notice: /Stage[main]/Apache::Default_mods/Apache::Mod[auth_basic]/File[auth_basic.load]/content: content changed '{md5}a92c34a3ce5e67e2ecbd272155ebe072' to '{md5}5eec35bb52e1ae9ff5eec602ed1d2374' +
-Notice: /Stage[main]/Apache::Default_mods/Apache::Mod[auth_basic]/File[auth_basic.load symlink]/target: target changed '../mods-available/auth_basic.load' to '/etc/apache2/mods-available/auth_basic.load' +
-Notice: /Stage[main]/Apache::Mod::Filter/Apache::Mod[filter]/File[filter.load symlink]/target: target changed '../mods-available/filter.load' to '/etc/apache2/mods-available/filter.load' +
-Notice: /Stage[main]/Apache::Default_mods/Apache::Mod[authz_core]/File[authz_core.load symlink]/target: target changed '../mods-available/authz_core.load' to '/etc/apache2/mods-available/authz_core.load' +
-Notice: /Stage[main]/Apache::Default_mods/Apache::Mod[access_compat]/File[access_compat.load]/content: content changed '{md5}f7f77b3eb4005749b583ff14b49f8bf1' to '{md5}a3e92887d86700b30a3869d0e8c159d7' +
-Notice: /Stage[main]/Apache::Default_mods/Apache::Mod[access_compat]/File[access_compat.load symlink]/target: target changed '../mods-available/access_compat.load' to '/etc/apache2/mods-available/access_compat.load' +
-Notice: /Stage[main]/Apache::Mod::Authz_user/Apache::Mod[authz_user]/File[authz_user.load]/content: content changed '{md5}bcf988f105564ec1e14b78df56a01cd8' to '{md5}69150f8246499e0135580d8cc16eaeab' +
-Notice: /Stage[main]/Apache::Mod::Authz_user/Apache::Mod[authz_user]/File[authz_user.load symlink]/target: target changed '../mods-available/authz_user.load' to '/etc/apache2/mods-available/authz_user.load' +
-Notice: /Stage[main]/Apache::Default_mods/Apache::Mod[authz_groupfile]/File[authz_groupfile.load]/content: content changed '{md5}97a3e14926ce7bf5f2d2a7b93ece648d' to '{md5}bf972e82336c72b20d67d871ef77d4ce' +
-Notice: /Stage[main]/Apache::Default_mods/Apache::Mod[authz_groupfile]/File[authz_groupfile.load symlink]/ensure: created +
-Notice: /Stage[main]/Apache::Mod::Env/Apache::Mod[env]/File[env.load symlink]/target: target changed '../mods-available/env.load' to '/etc/apache2/mods-available/env.load' +
-Notice: /Stage[main]/Apache::Mod::Worker/Apache::Mpm[worker]/File[/etc/apache2/mods-available/worker.load]/ensure: defined content as '{md5}3064ef75f030fbf76986f6f073beb113' +
-Notice: /Stage[main]/Apache::Mod::Worker/Apache::Mpm[worker]/File[/etc/apache2/mods-enabled/worker.conf]/ensure: created +
-Notice: /Stage[main]/Apache::Mod::Worker/Apache::Mpm[worker]/File[/etc/apache2/mods-enabled/worker.load]/ensure: created +
-Notice: /Stage[main]/Apache::Mod::Cgid/File[cgid.conf]/content: content changed '{md5}e8a2836392051bde889cf9c137058273' to '{md5}7dffbb5823bcbb9ab4d3e67ab14d38a0' +
-Notice: /Stage[main]/Apache::Mod::Cgid/Apache::Mod[cgid]/File[cgid.load symlink]/ensure: created +
-Notice: /Stage[main]/Apache::Mod::Cgid/Apache::Mod[cgid]/File[cgid.conf symlink]/ensure: created +
-Notice: /Stage[main]/Apache/File[/etc/apache2/mods-enabled/mpm_event.conf]/ensure: removed +
-Notice: /Stage[main]/Apache/File[/etc/apache2/mods-enabled/mpm_event.load]/ensure: removed +
-Notice: /Stage[main]/Apache/File[/etc/apache2/mods-enabled/status.conf]/ensure: removed +
-Notice: /Stage[main]/Apache/File[/etc/apache2/mods-enabled/status.load]/ensure: removed +
-Notice: /Stage[main]/Main/Apache::Vhost[cat-pictures.com]/File[/var/www/cat-pictures]/ensure: created +
-Notice: /Stage[main]/Main/File[/var/www/cat-pictures/index.html]/ensure: defined content as '{md5}e274bce610d32200bb7256542f720833' +
-Notice: /Stage[main]/Main/Apache::Vhost[cat-pictures.com]/Concat[25-cat-pictures.com.conf]/File[/etc/apache2/sites-available/25-cat-pictures.com.conf]/ensure: defined content as '{md5}3096e79ddd479b5289234df595f43817' +
-Notice: /Stage[main]/Main/Apache::Vhost[cat-pictures.com]/File[25-cat-pictures.com.conf symlink]/ensure: created+
 Notice: /Stage[main]/Apache::Service/Service[httpd]: Triggered 'refresh' from 1 event Notice: /Stage[main]/Apache::Service/Service[httpd]: Triggered 'refresh' from 1 event
-Notice: Applied catalog in 66.04 seconds+Notice: Applied catalog in 8.94 seconds
 </code> </code>
  
Ligne 1586: Ligne 1589:
 </code> </code>
  
-<WRAP center round important 50%+<WRAP center round important> 
-**Important** - La première ressource est de type **file**. Cette ressource crée si necéssaire le répertoire **/var/www/**.+**Important** - La première ressource est de type **file**. Cette ressource crée si nécessaire le répertoire **/var/www/**.
 </WRAP> </WRAP>
  
Ligne 1603: Ligne 1606:
 </file> </file>
  
-<WRAP center round important 50%>+<WRAP center round important>
 **Important** - Le nom de la ressource **/tmp/wordpress.tar.gz** indique le nom et l'emplacement de l'archive téléchargé - **latest.tar.gz**. L'attribut **extract** indique à Puppet d'extraire l'archive dans l'attribut **extract_path**. L'attribut **source** indique à Puppet d'où il faut télécharger l'archive. L'attribut **creates** indique le nom d'un répertoire qui existera une fois l'archive désarchivée. De cette façon si Puppet détecte la présence de ce répertoire il ne procédera pas à l'extraction de l'archive considérant que l'extraction a déjà eu lieu. Dernièrement l'attribut **cleanup** indique à Puppet de supprimer l'archive à la fin du processus. **Important** - Le nom de la ressource **/tmp/wordpress.tar.gz** indique le nom et l'emplacement de l'archive téléchargé - **latest.tar.gz**. L'attribut **extract** indique à Puppet d'extraire l'archive dans l'attribut **extract_path**. L'attribut **source** indique à Puppet d'où il faut télécharger l'archive. L'attribut **creates** indique le nom d'un répertoire qui existera une fois l'archive désarchivée. De cette façon si Puppet détecte la présence de ce répertoire il ne procédera pas à l'extraction de l'archive considérant que l'extraction a déjà eu lieu. Dernièrement l'attribut **cleanup** indique à Puppet de supprimer l'archive à la fin du processus.
 </WRAP> </WRAP>
Ligne 1611: Ligne 1614:
 <code> <code>
 vagrant@ubuntu-xenial:~$ sudo puppet apply --environment=pbg module_archive.pp vagrant@ubuntu-xenial:~$ sudo puppet apply --environment=pbg module_archive.pp
-Notice: Compiled catalog for ubuntu-xenial.ief2i.fr in environment pbg in 0.53 seconds+Notice: Compiled catalog for ubuntu-xenial in environment pbg in 0.07 seconds
 Notice: /Stage[main]/Main/Archive[/tmp/wordpress.tar.gz]/ensure: download archive from https://wordpress.org/latest.tar.gz to /tmp/wordpress.tar.gz and extracted in /var/www with cleanup Notice: /Stage[main]/Main/Archive[/tmp/wordpress.tar.gz]/ensure: download archive from https://wordpress.org/latest.tar.gz to /tmp/wordpress.tar.gz and extracted in /var/www with cleanup
-Notice: Applied catalog in 99.85 seconds+Notice: Applied catalog in 4.44 seconds
 </code> </code>
  
Ligne 1624: Ligne 1627:
  
 ---- ----
-<html> + 
-<DIV ALIGN="CENTER"> +Copyright © 2022 Hugh Norris.
-Copyright © 2019 Hugh Norris.<br><br> +
-</div> +
-</html>+
Menu