Browse Source

Split projects

master
Bertrand Janvoie 4 years ago
parent
commit
6f3617047c
  1. 2
      Pepiniere/ansible/Formation/.gitignore
  2. 29
      Pepiniere/ansible/Formation/.gitlab-ci.yml
  3. 3
      Pepiniere/ansible/Formation/.gitmodules
  4. 118
      Pepiniere/ansible/Formation/0.Introduction-formation.md
  5. 206
      Pepiniere/ansible/Formation/1.Introduction-ansible.md
  6. 85
      Pepiniere/ansible/Formation/10.bonnes-pratiques.md
  7. 328
      Pepiniere/ansible/Formation/2.installation-inventaire.md
  8. 384
      Pepiniere/ansible/Formation/3.commandes-ad-hoc.md
  9. 578
      Pepiniere/ansible/Formation/4.playbooks.md
  10. 409
      Pepiniere/ansible/Formation/5.roles.md
  11. 385
      Pepiniere/ansible/Formation/6.structures-de-controle.md
  12. 516
      Pepiniere/ansible/Formation/7.templates.md
  13. 306
      Pepiniere/ansible/Formation/8.notions-avancees.md
  14. 246
      Pepiniere/ansible/Formation/9.Ansible-Galaxy.md
  15. 29
      Pepiniere/ansible/Formation/README.md
  16. 54
      Pepiniere/ansible/Formation/ansible-config-virtualbox-vms.md
  17. BIN
      Pepiniere/ansible/Formation/images/ansible-ad-hoc-deployment-workflow.png
  18. BIN
      Pepiniere/ansible/Formation/images/ansible-ad-hoc-multi-node-deployment.png
  19. BIN
      Pepiniere/ansible/Formation/images/ansible-archi-playbooks.png
  20. BIN
      Pepiniere/ansible/Formation/images/ansible-archi-roles.png
  21. BIN
      Pepiniere/ansible/Formation/images/ansible-archi-ssh.png
  22. BIN
      Pepiniere/ansible/Formation/images/ansible-galaxy-site.png
  23. BIN
      Pepiniere/ansible/Formation/images/ansible-playbook-deployment-workflow.png
  24. BIN
      Pepiniere/ansible/Formation/images/ansible-playbook-multi-node-deployment-workflow.png
  25. BIN
      Pepiniere/ansible/Formation/images/ci-vs-cd-devops-difference.jpg
  26. 70
      Pepiniere/ansible/Formation/images/logo-ansible.svg
  27. BIN
      Pepiniere/ansible/Formation/images/logo-molecule.png
  28. 240
      Pepiniere/ansible/Formation/images/logo-testinfra.svg
  29. BIN
      Pepiniere/ansible/Formation/images/manual-deployment-without-ansible.png
  30. BIN
      Pepiniere/ansible/Formation/images/tower-dashboard.png
  31. BIN
      Pepiniere/ansible/Formation/images/tp.gif
  32. 150
      Pepiniere/ansible/Formation/index.html
  33. 72
      Pepiniere/ansible/Formation/introduction.html
  34. 13
      Pepiniere/ansible/Formation/revealjs/README.md
  35. 239
      Pepiniere/ansible/Formation/revealjs/content.md
  36. 5
      Pepiniere/ansible/Formation/revealjs/css/custom.css
  37. 202
      Pepiniere/ansible/Formation/revealjs/css/print/paper.css
  38. 160
      Pepiniere/ansible/Formation/revealjs/css/print/pdf.css
  39. 1387
      Pepiniere/ansible/Formation/revealjs/css/reveal.css
  40. 1411
      Pepiniere/ansible/Formation/revealjs/css/reveal.scss
  41. 21
      Pepiniere/ansible/Formation/revealjs/css/theme/README.md
  42. 291
      Pepiniere/ansible/Formation/revealjs/css/theme/beige.css
  43. 287
      Pepiniere/ansible/Formation/revealjs/css/theme/black.css
  44. 310
      Pepiniere/ansible/Formation/revealjs/css/theme/blood.css
  45. 293
      Pepiniere/ansible/Formation/revealjs/css/theme/league.css
  46. 291
      Pepiniere/ansible/Formation/revealjs/css/theme/moon.css
  47. 285
      Pepiniere/ansible/Formation/revealjs/css/theme/night.css
  48. 287
      Pepiniere/ansible/Formation/revealjs/css/theme/serif.css
  49. 367
      Pepiniere/ansible/Formation/revealjs/css/theme/sii.css
  50. 287
      Pepiniere/ansible/Formation/revealjs/css/theme/simple.css
  51. 294
      Pepiniere/ansible/Formation/revealjs/css/theme/sky.css
  52. 291
      Pepiniere/ansible/Formation/revealjs/css/theme/solarized.css
  53. 39
      Pepiniere/ansible/Formation/revealjs/css/theme/source/beige.scss
  54. 49
      Pepiniere/ansible/Formation/revealjs/css/theme/source/black.scss
  55. 79
      Pepiniere/ansible/Formation/revealjs/css/theme/source/blood.scss
  56. 34
      Pepiniere/ansible/Formation/revealjs/css/theme/source/league.scss
  57. 57
      Pepiniere/ansible/Formation/revealjs/css/theme/source/moon.scss
  58. 35
      Pepiniere/ansible/Formation/revealjs/css/theme/source/night.scss
  59. 35
      Pepiniere/ansible/Formation/revealjs/css/theme/source/serif.scss
  60. 38
      Pepiniere/ansible/Formation/revealjs/css/theme/source/simple.scss
  61. 46
      Pepiniere/ansible/Formation/revealjs/css/theme/source/sky.scss
  62. 63
      Pepiniere/ansible/Formation/revealjs/css/theme/source/solarized.scss
  63. 49
      Pepiniere/ansible/Formation/revealjs/css/theme/source/white.scss
  64. 29
      Pepiniere/ansible/Formation/revealjs/css/theme/template/mixins.scss
  65. 43
      Pepiniere/ansible/Formation/revealjs/css/theme/template/settings.scss
  66. 346
      Pepiniere/ansible/Formation/revealjs/css/theme/template/theme.scss
  67. 289
      Pepiniere/ansible/Formation/revealjs/css/theme/white.css
  68. 3
      Pepiniere/ansible/Formation/revealjs/highlight/highlight.pack.js
  69. 108
      Pepiniere/ansible/Formation/revealjs/highlight/styles/agate.css
  70. 66
      Pepiniere/ansible/Formation/revealjs/highlight/styles/androidstudio.css
  71. 88
      Pepiniere/ansible/Formation/revealjs/highlight/styles/arduino-light.css
  72. 73
      Pepiniere/ansible/Formation/revealjs/highlight/styles/arta.css
  73. 45
      Pepiniere/ansible/Formation/revealjs/highlight/styles/ascetic.css
  74. 83
      Pepiniere/ansible/Formation/revealjs/highlight/styles/atelier-cave-dark.css
  75. 85
      Pepiniere/ansible/Formation/revealjs/highlight/styles/atelier-cave-light.css
  76. 69
      Pepiniere/ansible/Formation/revealjs/highlight/styles/atelier-dune-dark.css
  77. 69
      Pepiniere/ansible/Formation/revealjs/highlight/styles/atelier-dune-light.css
  78. 84
      Pepiniere/ansible/Formation/revealjs/highlight/styles/atelier-estuary-dark.css
  79. 84
      Pepiniere/ansible/Formation/revealjs/highlight/styles/atelier-estuary-light.css
  80. 69
      Pepiniere/ansible/Formation/revealjs/highlight/styles/atelier-forest-dark.css
  81. 69
      Pepiniere/ansible/Formation/revealjs/highlight/styles/atelier-forest-light.css
  82. 69
      Pepiniere/ansible/Formation/revealjs/highlight/styles/atelier-heath-dark.css
  83. 69
      Pepiniere/ansible/Formation/revealjs/highlight/styles/atelier-heath-light.css
  84. 69
      Pepiniere/ansible/Formation/revealjs/highlight/styles/atelier-lakeside-dark.css
  85. 69
      Pepiniere/ansible/Formation/revealjs/highlight/styles/atelier-lakeside-light.css
  86. 84
      Pepiniere/ansible/Formation/revealjs/highlight/styles/atelier-plateau-dark.css
  87. 84
      Pepiniere/ansible/Formation/revealjs/highlight/styles/atelier-plateau-light.css
  88. 84
      Pepiniere/ansible/Formation/revealjs/highlight/styles/atelier-savanna-dark.css
  89. 84
      Pepiniere/ansible/Formation/revealjs/highlight/styles/atelier-savanna-light.css
  90. 69
      Pepiniere/ansible/Formation/revealjs/highlight/styles/atelier-seaside-dark.css
  91. 69
      Pepiniere/ansible/Formation/revealjs/highlight/styles/atelier-seaside-light.css
  92. 69
      Pepiniere/ansible/Formation/revealjs/highlight/styles/atelier-sulphurpool-dark.css
  93. 69
      Pepiniere/ansible/Formation/revealjs/highlight/styles/atelier-sulphurpool-light.css
  94. 96
      Pepiniere/ansible/Formation/revealjs/highlight/styles/atom-one-dark.css
  95. 96
      Pepiniere/ansible/Formation/revealjs/highlight/styles/atom-one-light.css
  96. 64
      Pepiniere/ansible/Formation/revealjs/highlight/styles/brown-paper.css
  97. BIN
      Pepiniere/ansible/Formation/revealjs/highlight/styles/brown-papersq.png
  98. 60
      Pepiniere/ansible/Formation/revealjs/highlight/styles/codepen-embed.css
  99. 71
      Pepiniere/ansible/Formation/revealjs/highlight/styles/color-brewer.css
  100. 77
      Pepiniere/ansible/Formation/revealjs/highlight/styles/darcula.css
  101. Some files were not shown because too many files have changed in this diff Show More

2
Pepiniere/ansible/Formation/.gitignore vendored

@ -1,2 +0,0 @@
*.pdf
*.zip

29
Pepiniere/ansible/Formation/.gitlab-ci.yml

@ -1,29 +0,0 @@
variables:
GIT_SUBMODULE_STRATEGY: recursive
stages:
- build
make-pdf:
stage: build
image:
name: astefanutti/decktape:2.11.0
entrypoint: [""]
tags:
- france
- sii
script:
#
# 1. We change the size with --size due to a strange rendering bug
# decribed here: https://github.com/astefanutti/decktape/issues/151
#
# 2. We also specify --chrome-arg=--disable-web-security to autorize
# Cross origin requests in chrome
#
- node /decktape/decktape.js --chrome-path chromium-browser --chrome-arg=--no-sandbox --chrome-arg=--disable-web-security --size='1576x1182' index.html ansible-formation.pdf
artifacts:
name: ansible.pdf
expire_in: 3 month
paths:
- ansible-formation.pdf

3
Pepiniere/ansible/Formation/.gitmodules vendored

@ -1,3 +0,0 @@
[submodule "revealjs"]
path = revealjs
url = ../../template-revealjs-sii-theme.git

118
Pepiniere/ansible/Formation/0.Introduction-formation.md

@ -1,118 +0,0 @@
# Ansible
__Formation__
Christian Tritten โ€ข Stรฉfan Lebosq
## Prรฉ-requis
* Virtualbox
4 VMs tรฉlรฉchargรฉes et importรฉes
* Putty
https://www.putty.org/
* Cafรฉ (!)
## Formation ร  distance
* Laisser votre camรฉra allumรฉe afin de favoriser
les รฉchanges
* Vous pouvez intervenir quand vous voulez...
mais gardez votre micro coupรฉ le reste du temps
* Levez la main en cas de problรจme
(debug sur les TPs en apartรฉ)
* Double pause pour รฉviter la surchauffe !
## Horaires jour
|||
|:-|-:|
|dรฉmarrage|__9h30__|
|pause|__~ 10h30 ~ 11h30__|
|repas|__12h30__|
|reprise|__14h00__|
|pause|__~ 15h00 ~ 16h00__|
|fin|__17h30__|
## Badge
Le port du badge SII de faรงon visible
est obligatoire dans les locaux.
## Tour de table
* Qui รชtes-vous ?
* Connaissez-vous dรฉjร  Ansible ou des outils similaires ?
* Qu'attendez-vous de la formation ?
* Avez-vous des ร  priori sur le mode distanciel ?
## Programme
### 1. Introduction
* DevOps et Infrastructure as Code
* Prรฉsentation d'Ansible
### 2. Installation et Mise en ล“uvre
* Installation et configuration
* Configuration SSH
* Mise en place de lโ€™inventaire
### 3. Les commandes Ad-Hoc
* CLI Ansible
* Principaux modules Ad-Hoc
### 4. Les Playbooks
* Dรฉfinition de tรขches
* Utilisation de variables
* Handlers et Notify
* Notion de rรดles
### 5. Les structures de contrรดle
* Les facts
* Les boucles et conditions
* Les inclusions
### 6. Les Templates
* Jinja2
* Filtres
* Tests
### 7. Notions avancรฉes
* Ansible Vault
* Tester ses Playbooks Ansible
* Dรฉvelopper ses propres modules
## C'est parti !!!
[La formation](index.html)
## Ressources internes
<!-- .slide: data-state="cheat-sheet" -->
1. Formation Ansible SII
<small>[https://gitlab.siinergy.net/sii-ouest/trainings/ansible](https://gitlab.siinergy.net/sii-ouest/trainings/ansible)</small>
2. Mattermost DevOps SII ouest
<small>[https://mattermost.siinergy.net/ouest/channels/topic-devops](https://mattermost.siinergy.net/ouest/channels/topic-devops)</small>

206
Pepiniere/ansible/Formation/1.Introduction-ansible.md

@ -1,206 +0,0 @@
<!-- .slide: data-state="nologo-slide" style="text-align: center" -->
# Ansible
![Logo Ansible](images/logo-ansible.svg)
<small>Antoire Bouhier โ€ข Christian Tritten โ€ข Alban Berthout</small>
## DevOps
## Infrastructure as Code
## DevOps
* Mouvement qui consiste ร  promouvoir le dialogue et la collaboration entre les รฉquipes _Dev_ et _Ops_.
* Ensemble de bonnes pratiques et de principes
รฉtablis entre :
- les รฉquipes DEV (de dรฉveloppement)
- les รฉquipes OPS (dโ€™exploitations)
* L'objectif de DevOps est de _fluidifier le processus de dรฉploiement_ d'une application.
## Les principaux axes du DevOps
1. Amรฉliorer la communication
<small>Organisation โ€ข Collaboration โ€ข Partage d'outils communs โ€ข Confรฉrences โ€ข Rรฉunions</small>
2. Accepter et banaliser les erreurs
<small>Droit ร  l'erreur โ€ข Responsabilitรฉ partagรฉe</small>
3. Mettre en prod le plus souvent possible
<small>Robustesse โ€ข Confiance</small>
4. Automatiser tout ce qui peut l'รชtre
<small>Tests โ€ข Cloud โ€ข Dรฉploiements โ€ข Configuration โ€ข Chaos monkey</small>
5. Rรฉcolter des mรฉtriques et indicateurs
dans une optique d'amรฉlioration continue
## Le champ d'application du DevOps
![devops](images/ci-vs-cd-devops-difference.jpg)
## Automatisation
Traiter de maniรจre automatique les opรฉrations
* de contrรดle,
* de rรฉgulation,
* dโ€™administration,
avec peu ou pas dโ€™intervention humaine.
## Intรฉrรชt de l'automatisation
* Rรฉduire la complexitรฉ
* Rรฉduire les possibilitรฉs dโ€™erreurs humaine
* Amรฉliorer les performance dโ€™un systรจme
* Augmenter la productivitรฉ et lโ€™innovation
* Amรฉliorer la robustesse, lโ€™agilitรฉ du dรฉploiement
* Rรฉduire le TTM dโ€™une application
## Infrastructure As Code
* L'infrastructure cible peut-รชtre dรฉcrite dans des fichiers de description ร  l'aide d'une syntaxe spรฉcifique.
* Il devient alors possible de gรฉrer et de versionner chaque modification apportรฉe ร  l'infrastructure.
* Construire, reconstruire, modifier ou dupliquer une infrastructure s'en trouve d'autant simplifiรฉ.
* Outils : Terraform, Ansible, Puppet, Docker, Kubernetes...
## Les outils de gestion de configuration
* Permettent de contrรดler l'ensemble des modifications apportรฉes sur lโ€™infrastructure dโ€™une entreprise.
* Assurent que cette infrastructure est configurรฉe selon les bonnes spรฉcifications.
* ร‰vitent l'apparition de trop grandes variations de configuration entre les serveurs.
## Quelques outils
- CFEngine (1993)
- Puppet (2005)
- Chef (2009)
- Ansible (2012)
## Ansible
* Logiciel libre (GPL-3.0)
* Initiรฉ en 2012
- Version 1.0 = 2013
- Version actuelle = 2.10 (2020), 2.9 pour Red Hat subscribers
* Dรฉveloppรฉ en Python
[https://github.com/ansible/ansible](https://github.com/ansible/ansible)
* Forte communautรฉ d'utilisateurs
* Ansible rachetรฉ par Red Hat en octobre 2015
* Red Hat rachetรฉ par IBM en octobre 2018
* Ansible est un moteur d'automatisation permettant :
- le provisionnement de logiciel,
- la gestion de la configuration.
* Pas d'agent
- utilise _SSH_ sur __Linux/Unix__
- utilise _WinRM_ sur __Windows__
* Mode _Push_
<small>Peut aussi fonctionner en _Pull_ (sur cibles Linux uniquement)</small>
### Cibles Linux
* La plupart des systรจmes Linux sont supportรฉs.
* Connexion par SSH.
* Prรฉ-requis sur les machines cibles :
- SSH server
- Python 2.7 ou 3.5
### Cibles Windows
* Desktop :
Windows 7, 8.1, 10
* Server :
Windows Server 2008, 2008 R2, 2012, 2012 R2, 2016, 2019
* Connexion par WinRM.
* Prรฉ-requis sur les machines cibles :
- PowerShell 3.0 ou +
- .NET 4.0 ou +
- Un WinRM listener doit รชtre crรฉรฉ et activรฉ.
### Documentation pour Windows
<small>https://docs.ansible.com/ansible/latest/user_guide/windows.html</small>
### Liste des modules pour Windows
<small>https://docs.ansible.com/ansible/2.9/modules/list_of_windows_modules.html</small>
<small>https://docs.ansible.com/ansible/latest/collections/ansible/windows/index.html</small>
### Pourquoi utiliser Ansible ?
* Maรฎtrise des actions exรฉcutรฉes sur les machines cibles.
* Moins d'erreurs qu'avec des actions manuelles.
* Simple ร  mettre en oeuvre.
* Courbe d'apprentissage rapide.
* Syntaxe dรฉclarative (pas de scripting).
* Libรจre les Ops des tรขches rรฉpรฉtitives.
### Sans outil de gestion de Configuration
![Schรฉma connexion sans Ansible](images/manual-deployment-without-ansible.png)
### Avec Ansible
![Schรฉma connexion avec Ansible](images/ansible-ad-hoc-deployment-workflow.png)

85
Pepiniere/ansible/Formation/10.bonnes-pratiques.md

@ -1,85 +0,0 @@
<!-- .slide: data-state="nologo-slide" style="text-align: center" -->
![Logo Ansible](images/logo-ansible.svg)
# Bonnes pratiques
## Rester simple !
## Rester clair !
- Apporter tout le soin nรฉcessaire ร  la lisibilitรฉ du code Ansible.
- Nommer toujours vos Plays et Tasks de maniรจre prรฉcise et significative.
- Privilรฉgiez la syntaxe YAML native.
<small>(Pas de : `name=httpd state=started enabled=yes`)</small>
- Ainsi fait, le code Ansible peut devenir la documentation de rรฉfรฉrence de votre workflow.
## Penser "dรฉclaratif"
- Ansible permet de dรฉcrire un _รฉtat dรฉsirรฉ_.
- Si vous essayez d'รฉcrire du code dans vos playbooks et rรดles, vous augmentez le risque d'รฉchec.
- Utilisez prioritairement les Modules Ansible chaque fois que c'est possible.
## Utiliser les Roles
- Utilisez les Roles !
- Ils permettent un trรจs bon dรฉcoupage du code Ansible.
- Ils permettent de gรฉrer des variables par dรฉfaut pour les composants.
## Attention aux variables !
- Ansible permet de dรฉclarer des variables dans une grande variรฉtรฉ d'emplacements. Il devient facile de s'y perdre !
- ร‰vitez de trop disperser les dรฉclarations de variables dans le code Ansible.
- Limitez les dรฉclarations de variables ร  deux ou trois emplacements clรฉs :
1. variables de groupes
2. variables de rรดles
- Documenter prรฉcisรฉment les variables que vous dรฉclarez dans votre code Ansible.
## Eviter autant que possible les Modules "Commands"
- Les modules de commandes gรฉnรฉriques tels que `shell` ou `command` peuvent conduire ร  certains dysfonctionnements. En effet les commandes Shell :
- ne sont pas toujours idempotentes.
- s'exรฉcuteront toujours et retourneront l'รฉtat `changed` (ร  moins de spรฉcifier `changed_when`).
- Les modules plus spรฉcifiques sont souvent prรฉvus pour รชtre agnostique du systรจme d'exploitation, ce qui permet d'augmenter la rรฉ-utilisabilitรฉ du code.
## Eviter le module "lineinfile"
- Utiliser les modules `copy` ou `template` plutรดt que `lineinfile` ou `replace`
- Pas besoin de connaรฎtre la syntaxe `regex`.
- Permet de contrรดler exactement le contenu du fichier final.
## Crรฉer des fichiers dโ€™inventaires sรฉparรฉs
- Si vous devez gรฉrer plusieurs environnements, crรฉez des fichiers d'inventaires sรฉparรฉs afin d'รฉviter les problรจmes !
## Les bonnes pratiques selon Ansible
<small>https://docs.ansible.com/ansible/latest/user_guide/playbooks_best_practices.html</small>
## Autres bonnes pratiques
<small>https://www.serverraumgeschichten.de/2018/04/ansible-best-practices/</small>

328
Pepiniere/ansible/Formation/2.installation-inventaire.md

@ -1,328 +0,0 @@
<!-- .slide: data-state="nologo-slide" style="text-align: center" -->
![Logo Ansible](images/logo-ansible.svg)
# Installation
## Installation d'Ansible
Environnement : CentOS 7 / 1vCPU / 512m RAM / 10G Disk
```none
$ sudo yum -y install epel-release
$ sudo yum -y update
$ sudo yum -y install ansible
$ ansible --version
ansible 2.9.16
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/home/ansible/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /bin/ansible
python version = 2.7.5 (default, Nov 16 2020, 22:23:17) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)]
```
Environnement : CentOS 8 / 1vCPU / 768m RAM / 10G Disk
```none
$ sudo dnf -y install epel-release
$ sudo dnf -y update
$ sudo dnf -y install ansible
$ ansible --version
ansible 2.9.16
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/ansible/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3.6/site-packages/ansible
executable location = /usr/bin/ansible
python version = 3.6.8 (default, Aug 24 2020, 17:57:11) [GCC 8.3.1 20191121 (Red Hat 8.3.1-5)]
```
## Configuration SSH
![Schรฉma connexion ssh](images/ansible-archi-ssh.png) <!-- .element: height="550px" -->
<!-- .slide: data-state="small-code" -->
1. Gรฉnรฉration d'une paire de clรฉs SSH
```none
ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (~/.ssh/id_rsa):
Created directory '/home/formation/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in ~/.ssh/id_rsa.
Your public key has been saved in ~/.ssh/id_rsa.pub.
The key fingerprint is:
08:d5:a7:66:ca:a0:0c:6c:2f:40:2b:0f:25:de:cf:4c root@centos7
The key's randomart image is:
+--[ RSA 2048]----+
| .o o.. |
| o +Eo |
| + . |
| . + o |
| S o = * o|
| . o @.|
| . = o|
| . o |
| o. |
+-----------------+
```
2. Copie de la clรฉ publique sur les machines cibles
```none
ssh-copy-id -i formation@10.6.214.70
ssh-copy-id -i formation@10.6.214.72
ssh-copy-id -i formation@10.6.214.73
ssh-copy-id -i formation@10.6.214.74
```
## Configuration
<!-- .slide: data-state="small-table" -->
Fichier | Description
- | -
`/etc/ansible/ansible.cfg` | Fichier de configuration global
`~/.ansible.cfg` | Fichier de surcharge par utilisateur
`/path/to/project/ansible.cfg` | Fichier de surcharge par projet
`/path/to/project/ansible.cfg`
```toml
[defaults]
log_path=./ansible.log
roles_path = ./roles:/opt/othersite/roles
retry_files_save_path=./retries/
```
Exemple de surcharge locale de la configuration d'Ansible.
<!-- .slide: data-state="nologo-slide" style="text-align: center" -->
![Logo Ansible](images/logo-ansible.svg)
# Inventaire
Fichier de dรฉclaration des machines cibles ร  adresser.
## Objectifs de l'inventaire
1. Dรฉclarer la liste des machines ร  adresser.
2. Dรฉclarer et associer des variables ร  :
- une machine en particulier,
- un sous-ensemble des machines,
- l'ensemble des machines.
![Inventaire](images/ansible-ad-hoc-multi-node-deployment.png)
* L'inventaire par dรฉfaut est dรฉfini dans le fichier `/etc/ansible/hosts`.
* Il faut รชtre _root_ pour pouvoir le modifier.
* Il est รฉgalement possible de crรฉer un fichier inventaire ร  l'emplacement de notre choix.
* Il est aussi possible de gรฉrer plusieurs inventaires correspondant ร  des plateformes diffรฉrentes.
<small>Dans le homedir de l'utilisateur Ansible par exemple :</small>
<!-- .slide: data-state="medium-code" -->
```none
~/inventories/
โ”œโ”€โ”€ dev
โ”‚ย ย  โ””โ”€โ”€ hosts <----- inventaire de l'environnement de dev
โ”œโ”€โ”€ qualif
โ”‚ย ย  โ””โ”€โ”€ hosts <----- inventaire de l'environnement de qualif
โ””โ”€โ”€ prod
โ””โ”€โ”€ hosts <----- inventaire de l'environnement de production
```
## Dรฉclaration de machines
Adresse IP
```none
10.6.214.70
10.6.214.72
10.6.214.73
10.6.214.74
```
Alias de la machine et adresse IP
```none
lb.formation.sii.fr ansible_host=10.6.214.70
web1.formation.sii.fr ansible_host=10.6.214.72
web2.formation.sii.fr ansible_host=10.6.214.73
bdd.formation.sii.fr ansible_host=10.6.214.74
```
<small>[https://docs.ansible.com/ansible/intro_inventory.html#hosts-and-groups](https://docs.ansible.com/ansible/intro_inventory.html#hosts-and-groups)</small>
Variables possibles pour les connexions :
* `ansible_host`
Le nom (si ce nom est diffรฉrent de l'alias) ou l'adresse IP de la machine cible.
* `ansible_port`
Le port ssh (si diffรฉrent de 22).
* `ansible_user`
L'utilisateur ssh ร  utiliser (si diffรฉrent de l'utilisateur courant).
* `ansible_ssh_pass`
Le mot de passe ssh de l'utilisateur `ansible_user`.
* `ansible_ssh_private_key_file`
La clรฉ privรฉe utilisรฉe par ssh. Utile en cas d'utilisation de plusieurs clรฉs et si on ne veut pas utiliser SSH agent.
## Dรฉclaration de groupes de machines
<!-- .slide: data-state="small-code" -->
```toml
lb.formation.sii.fr ansible_host=10.6.214.70
web1.formation.sii.fr ansible_host=10.6.214.72
web2.formation.sii.fr ansible_host=10.6.214.73
bdd.formation.sii.fr ansible_host=10.6.214.74
[lb] # groupe
lb.formation.sii.fr
[web]
web[1:2].formation.sii.fr # exemple de raccourci
# d'รฉcriture
[db]
bdd.formation.sii.fr
[formation:children] # groupe de groupes
lb
web
db
```
## Groupes par dรฉfaut
* `all` : contient toutes les machines.
* `ungrouped` : contient toutes les machines qui n'appartiennent pas ร  un groupe (en dehors de `all`)
## Lancer une commande sur un groupe de machines spรฉcifique
<!-- .slide: data-state="small-code" -->
```none
$ ansible formation -m ping
```
```json
10.6.214.70 | SUCCESS => {
"changed": false,
"ping": "pong"
}
10.6.214.74 | SUCCESS => {
"changed": false,
"ping": "pong"
}
10.6.214.72 | SUCCESS => {
"changed": false,
"ping": "pong"
}
10.6.214.73 | SUCCESS => {
"changed": false,
"ping": "pong"
}
```
## Variables de groupes
<!-- .slide: data-state="small-code" -->
```ini
...
[web]
web[1-2].formation.sii.fr
[db]
bdd.formation.sii.fr
[formation:children]
web
db
[formation:vars] # variables du groupe formation
ansible_user: "formation"
ansible_ssh_private_key_file: /home/formation/.ssh/id_rsa
```
## Vรฉrifier les variables de l'inventaire
<!-- .slide: data-state="medium-code" -->
```none
$ ansible-inventory -i inventories/formation/hosts --list --yaml
```
```yaml
all:
children:
web:
hosts:
web1.formation.sii.fr:
ansible_become: 'yes'
ansible_become_pass: ansible
ansible_host: 192.168.56.102
ansible_ssh_private_key_file: /home/ansible/.ssh/id_rsa
ansible_user: ansible
web2.formation.sii.fr:
ansible_become: 'yes'
ansible_become_pass: ansible
ansible_host: 192.168.56.103
ansible_ssh_private_key_file: /home/ansible/.ssh/id_rsa
ansible_user: ansible
db:
hosts:
bdd.formation.sii.fr:
ansible_become: 'yes'
ansible_become_pass: ansible
ansible_host: 192.168.56.104
ansible_ssh_private_key_file: /home/ansible/.ssh/id_rsa
ansible_user: ansible
```
## Externaliser les variables
A utiliser pour sรฉparer les variables de la liste des machines.
<!-- .slide: data-state="small-code" -->
```none
~/inventories/
โ””โ”€โ”€ lab
ย ย  โ”œโ”€โ”€ group_vars
ย  ย  โ”‚ย ย  โ”œโ”€โ”€ web <--- variables pour le groupe web
ย ย  โ”‚ย ย  โ””โ”€โ”€ db <--- variables pour le groupe db
โ”œโ”€โ”€ host_vars
โ”‚ย ย  โ”œโ”€โ”€ web1.formation.sii.fr <--- variables pour la machine web1
โ”‚ โ””โ”€โ”€ web2.formation.sii.fr <--- variables pour la machine web2
ย ย  โ””โ”€โ”€ hosts
```
Les dossiers `group_vars` et `host_vars` permettent l'organisation des fichiers de variables.
<!-- .slide: data-state="nologo-slide" style="text-align: center" -->
## Travaux pratiques
![Travaux pratiques](images/tp.gif)
<small>[TP Ansible : Inventaire](travaux-pratiques/tp-ansible-inventaire.html)</small>

384
Pepiniere/ansible/Formation/3.commandes-ad-hoc.md

@ -1,384 +0,0 @@
<!-- .slide: data-state="nologo-slide" style="text-align: center" -->
![Logo Ansible](images/logo-ansible.svg)
# Commandes Ad-Hoc
Exรฉcuter des actions simples
sur un ensemble de machines.
## Les commandes Ad-Hoc ?
* Commandes permettant l'exรฉcution simple, rapide et ponctuelle de commandes unitaires.
* Elles peuvent cibler
- une seule machine,
- un groupe de machines spรฉcifique,
- l'ensemble des machines prรฉsentes dans l'inventaire.
* Elles se reposent sur les Modules Ansible.
## Les Modules Ansible
* Unitรฉs de traitement rรฉutilisables.
* Permettent la rรฉalisation dโ€™une tรขche prรฉcise.
* ร‰crits en Python.
* Code รฉprouvรฉ.
* Nombreux modules disponibles.
* Possibilitรฉ d'รฉcrire ses propres modules.
## Des centaines de modules disponibles !
<small>
Cloud Modules โ€ข Clustering Modules โ€ข Commands Modules โ€ข Crypto Modules โ€ข
Database Modules โ€ข Files Modules โ€ข Identity Modules โ€ข Inventory Modules โ€ข
Messaging Modules โ€ข Monitoring Modules โ€ข Network Modules โ€ข Notification
Modules โ€ข Packaging Modules โ€ข Source Control Modules โ€ข Storage Modules โ€ข
System Modules โ€ข Utilities Modules โ€ข Web Infrastructure Modules โ€ข Windows
Modules โ€ข ...
</small>
<small>https://docs.ansible.com/ansible/2.9/modules/modules_by_category.html</small>
<small>https://docs.ansible.com/ansible/latest/collections/index.html</small>
## Utilisation de modules
`$ ansible <pattern> -m <module> [-a <params>]`
* `<pattern>` peut reprรฉsenter :
- une machine
- toutes les machines (alias `all`)
- un groupe
- une expression
<!-- .slide: data-state="small-code" -->
```none
$ ansible formation:\!web -m command -a "uname -r"
bdd.formation.sii.fr | SUCCESS | rc=0 >>
3.10.0-327.28.3.el7.x86_64
lb.formation.sii.fr | SUCCESS | rc=0 >>
3.10.0-327.28.3.el7.x86_64
```
## Module Command
* ร€ utiliser :
* pour des commandes simples
* Pour recueillir des informations
* Exemples :
* ร‰teindre/redรฉmarrer des serveurs
* Copier des fichiers
* Crรฉer des users/groups
* Installer des packages
### Exemple
<!-- .slide: data-state="medium-code" -->
Crรฉation rapide d'un utilisateur
sur un ensemble de machines
```none
$ ansible -m command -a "sudo useradd donald" 'formation'
10.6.214.70 | SUCCESS | rc=0 >>
10.6.214.73 | SUCCESS | rc=0 >>
10.6.214.74 | SUCCESS | rc=0 >>
10.6.214.72 | SUCCESS | rc=0 >>
$ ansible -m command -a "useradd donald" 'formation' --become
```
`--become` permet de passer changer d'utilisateur
pour jouer la commande.
### Exemple
<!-- .slide: data-state="medium-code" -->
Affichage des utilisateurs crรฉรฉs
```none
$ ansible -m command -a "grep donald /etc/passwd" 'formation'
10.6.214.74 | SUCCESS | rc=0 >>
donald:x:1009:1010::/home/donald:/bin/bash
10.6.214.70 | SUCCESS | rc=0 >>
donald:x:1009:1010::/home/donald:/bin/bash
10.6.214.72 | SUCCESS | rc=0 >>
donald:x:1009:1010::/home/donald:/bin/bash
10.6.214.73 | SUCCESS | rc=0 >>
donald:x:1009:1010::/home/donald:/bin/bash
```
## Documentation des modules
* Recherche "ansible module nom-module" (Google)
* `$ ansible-doc <nom-module>` (CLI)
<!-- .slide: data-state="nologo-slide" style="text-align: center" -->
## Travaux pratiques
![Travaux pratiques](images/tp.gif)
<small>[TP Ansible : commandes ad-hoc bases](travaux-pratiques/tp-ansible-les-commandes-ad-hoc.html)</small>
## Modules de commandes
<!-- .slide: data-state="small-table" -->
Module (2.9) | Module (2.10) | Description
- | - | -
`command` | `ansible.builtin.command` | Executes a command on a remote node
`expect` | `ansible.builtin.expect` | Executes a command and responds to prompts.
`psexec` | `community.windows.psexec` | Runs commands on a remote Windows host based on the PsExec model
`raw` | `ansible.builtin.raw` | Executes a low-down and dirty SSH command
`script` | `ansible.builtin.script` | Runs a local script on a remote node after transferring it
`shell` | `ansible.builtin.shell` | Execute commands in nodes.
`telnet` | `ansible.netcommon.telnet` | Executes a low-down and dirty telnet command
<small>https://docs.ansible.com/ansible/2.9/modules/list_of_commands_modules.html</small>
## Modules de gestion de fichiers
<!-- .slide: data-state="small-table" -->
Module (2.9) | Module (2.10) | Description
- | - | -
`blockinfile` | `ansible.builtin.blockinfile` | Insert/update/remove a text block surrounded by marker lines
`copy` | `ansible.builtin.copy` | Copies files to remote locations
`fetch` | `ansible.builtin.fetch` | Fetches a file from remote nodes
`file` | `ansible.builtin.file` | Sets attributes of files
`lineinfile` | `ansible.builtin.lineinfile` | Manage lines in text files
`replace` | `ansible.builtin.replace` | Replace all instances of a particular string in a file using a back-referenced regular expression.
`stat` | `ansible.builtin.stat` | Retrieve file or file system status
`template` | `ansible.builtin.template` | Templates a file out to a remote server
... | ... | ...
<small>https://docs.ansible.com/ansible/2.9/modules/list_of_files_modules.html</small>
### Exemple
Modifier les attributs d'un fichier sur les machines
du groupe formation
<!-- .slide: data-state="small-code" -->
```none
$ ansible -m file -a "dest=/etc/foo mode=0660 owner=root group=root" \
formation
10.6.214.72 | SUCCESS => {
"changed": true,
"gid": 0,
"group": "root",
"mode": "0660",
"owner": "root",
"path": "/etc/foo",
"secontext": "system_u:object_r:net_conf_t:s0",
"size": 158,
"state": "file",
"uid": 0
...
}
```
## Modules de gestion de paquets
<small>https://docs.ansible.com/ansible/2.9/modules/list_of_packaging_modules.html</small>
### Paquets Debian / Ubuntu
<!-- .slide: data-state="small-table" -->
Module (2.9) | Module (2.10) | Description
- | - | -
`apt` | `ansible.builtin.apt` | Manages apt-packages
`apt_key` | `ansible.builtin.apt_key` | Add or remove an apt key
`apt_repository` | `ansible.builtin.apt_repository` | Add and remove APT repositories
`dpkg_selections` | `ansible.builtin.dpkg_selections` | Dpkg package selection selections
`package` | `ansible.builtin.package` | Generic OS package manager
`package_facts` | `ansible.builtin.package_facts` | Package information as facts
<!-- .slide: data-state="small-table" -->
### Paquets RedHat / CentOS / Fedora
Module (2.9) | Module (2.10) | Description
- | - | -
`dnf` | `ansible.builtin.dnf` | Manages packages with the dnf package manager
`yum` | `ansible.builtin.yum` | Manages packages with the yum package manager
`yum_repository` | `ansible.builtin.yum_repository` |Add or remove YUM repositories
`redhat_subscription` | `community.general.redhat_subscription` | Manage registration and subscriptions to RHSM using subscription-manager
`rhn_channel` | `community.general.rhn_channel` | Adds or removes Red Hat software channels
`rhn_register` | `community.general.rhn_register` | Manage RHN registration using rhnreg_ks
`rhsm_repository` | `community.general.rhsm_repository` | Manage RHSM repositories using subscription-manager
`rpm_key` | `ansible.builtin.rpm_key` | Adds or removes a gpg key from the rpm db
`package` | `ansible.builtin.package` | Generic OS package manager
`package_facts` | `ansible.builtin.package_facts` | Package information as facts
<!-- .slide: data-state="small-table" -->
### Paquets Suse / OpenSuse
Module (2.9) | Module (2.10) | Description
- | - | -
`zypper` | `community.general.zypper` | Manage packages on SUSE and openSUSE
`zypper_repository` |`community.general.zypper_repository` | Add and remove Zypper repositories
`package` | `ansible.builtin.package` | Generic OS package manager
`package_facts` | `ansible.builtin.package_facts` | Package information as facts
<!-- .slide: data-state="small-table" -->
### Paquets relatifs ร  des langages de programmation
Module (2.9) | Module (2.10) | Description
- | - | -
`cpanm` | `community.general.cpanm` | Manages Perl library dependencies.
`gem` | `community.general.gem` | Manage Ruby gems
`npm` | `community.general.npm` | Manage node.js packages with npm
`pip` |`ansible.builtin.pip` | Manages Python library dependencies
... | ... | ...
### Exemple
Vรฉrification de la prรฉsence d'un paquet
<!-- .slide: data-state="small-code" -->
```none
$ ansible -m yum -a "name=vim state=present" 'formation'
10.6.214.70 | SUCCESS => {
"changed": true,
"rc": 0,
"results": [
...
Installing :
2:vim-filesystem-7.4.160-1.el7_3.1.x86_64
2:vim-common-7.4.160-1.el7_3.1.x86_64
gpm-libs-1.20.7-5.el7.x86_64
2:vim-enhanced-7.4.160-1.el7_3.1.x86_64
Installed:
vim-enhanced.x86_64 2:7.4.160-1.el7_3.1
Dependency Installed:
gpm-libs.x86_64 0:1.20.7-5.el7
vim-common.x86_64 2:7.4.160-1.el7_3.1
vim-filesystem.x86_64 2:7.4.160-1.el7_3.1
Complete!"
]
}
```
## Modules de gestion de code
* git
* subversion
* hg
Ces modules permettent de cloner des dรฉpรดts de code.
<small>https://docs.ansible.com/ansible/2.9/modules/list_of_source_control_modules.html</small>
## Modules de gestion du systรจme
<small>https://docs.ansible.com/ansible/2.9/modules/list_of_system_modules.html</small>
<!-- .slide: data-state="small-table" -->
### Utilisateurs et groupes
Module (2.9) | Module (2.10) | Description
- | - | -
`user` | `ansible.builtin.user` | Manage user accounts
`group` | `ansible.builtin.group` | Add or remove groups
<!-- .slide: data-state="small-table" -->
### Stockage
Module (2.9) | Module (2.10) | Description
- | - | -
`parted` | `community.general.parted` | Configure block device partitions
`lvg` | `community.general.lvg` | Configure LVM volume groups
`lvol` | `community.general.lvol` | Configure LVM logical volumes
`filesystem` | `community.general.filesystem` | Makes a filesystem
<!-- .slide: data-state="small-table" -->
### Services
Module (2.9) | Module (2.10) | Description
- | - | -
`service` | `ansible.builtin.service` | Manage services
`service_facts` | `ansible.builtin.service_facts` | Return service state information as fact data
`systemd` | `ansible.builtin.systemd` | Manage services
`sysvinit` | `ansible.builtin.sysvinit` | Manage SysV services
<!-- .slide: data-state="small-table" -->
### Rรฉseau
Module (2.9) | Module (2.10) | Description
- | - | -
`ping` | `ansible.builtin.ping` | Try to connect to host, verify a usable python and return pong on success
`hostname` | `ansible.builtin.hostname` | Manage hostname
`firewalld` | `ansible.posix.firewalld` | Manage arbitrary ports/services with firewalld
`iptables` | `ansible.builtin.iptables` | Modify the systems iptables
<!-- .slide: data-state="small-table" -->
### Configuration SSH
Module (2.9) | Module (2.10) | Description
- | - | -
`authorized_key` | `ansible.posix.authorized_key` | Adds or removes an SSH authorized key
`known_hosts` | `ansible.builtin.known_hosts` | Add or remove a host from the known_hosts file
### Divers
<!-- .slide: data-state="small-table" -->
Module (2.9) | Module (2.10) | Description
- | - | -
`cron` | `ansible.builtin.cron` | Manage cron.d and crontab entries
`reboot` | `ansible.builtin.reboot` | Reboot a machine
`setup` | `ansible.builtin.setup` | Gathers facts about remote hosts
`timezone` | `community.general.timezone` | Configure timezone setting
### Exemple
<!-- .slide: data-state="small-code" -->
Rรฉcupรฉration des _facts_ de machines distantes
```none
$ ansible -m setup 'formation'
10.6.214.70 | SUCCESS => {
"ansible_facts": {
"ansible_all_ipv4_addresses": [
"10.6.214.70"
],
"ansible_all_ipv6_addresses": [
"fe80::250:56ff:fe9d:1ae5"
],
"ansible_architecture": "x86_64",
"ansible_bios_date": "09/17/2015",
"ansible_bios_version": "6.00",
"ansible_cmdline": {
"BOOT_IMAGE": "/vmlinuz-3.10.0-327.28.3.el7.x86_64",
"LANG": "fr_FR.UTF-8",
"crashkernel": "auto",
"quiet": true,
"rd.lvm.lv": "rootvg/slashlv",
"rhgb": true,
```

578
Pepiniere/ansible/Formation/4.playbooks.md

@ -1,578 +0,0 @@
<!-- .slide: data-state="nologo-slide" style="text-align: center" -->
![Logo Ansible](images/logo-ansible.svg)
# Playbooks Ansible
Jouer et rejouer facilement un jeu de commandes prรฉdรฉfini sur un ensemble de machines.
![Schรฉma archi globale](images/ansible-archi-playbooks.png)
## Format du Playbook
* Il se prรฉsente sous la forme d'un simple fichier texte au format `yaml`.
* Il peut donc รชtre facilement versionnรฉ dans un outil de gestion de version.
### yaml
* Format ouvert de reprรฉsentation de donnรฉes.
* Acronyme rรฉcursif de _YAML Ain't Markup Language_.
* Permet de reprรฉsenter des donnรฉes complexes tout en conservant une excellente lisibilitรฉ.
* Utilisation en forte progression ces derniรจres annรฉes.
<small>Ansible, GitLab, Docker Compose, Kubernetes manifests, etc...</small>
* Site officiel : https://yaml.org/
### YAML basics
https://fr.wikipedia.org/wiki/YAML
* _attention_ ! l'indentation se fait avec un ou plusieurs espaces, jamais avec des tabulations !
* Les commentaires sont signalรฉs par le signe diรจse `#` et se prolongent sur toute la ligne.
* Les รฉlรฉments de listes sont dรฉnotรฉs par le tiret `-`, suivi d'une espace, ร  raison d'un รฉlรฉment par ligne.
* Les tableaux sont de la forme `clรฉ: valeur`, ร  raison d'un couple par ligne.
### YAML basics
https://fr.wikipedia.org/wiki/YAML
* Les chaรฎnes de caractรจres peuvent รชtre entourรฉes de guillemets doubles `"`, ou simples `'`, sachant qu'un guillemet s'รฉchappe avec un antislash `\`, alors qu'une apostrophe s'รฉchappe avec une autre apostrophe.
* Les chaรฎnes de caractรจres peuvent de plus รชtre reprรฉsentรฉes par un bloc indentรฉ avec des modificateurs facultatifs pour conserver `|` ou รฉliminer `>` les retours ร  la ligne.
* Plusieurs documents rassemblรฉs dans un seul fichier sont sรฉparรฉs par trois traits d'union `---`.
### YAML basics
https://fr.wikipedia.org/wiki/YAML
<!-- .slide: data-state="medium-code" -->
```
---
receipt: Oz-Ware Purchase Invoice
date: 2012-08-06
customer:
given: Dorothy
family: Gale
items:
- part_no: A4786
descrip: Water Bucket (Filled)
price: 1.47
quantity: 4
- part_no: E1628
descrip: High Heeled "Ruby" Slippers
size: 8
price: 100.27
quantity: 1
bill-to: &id001
street: |
123 Tornado Alley
Suite 16
city: East Centerville
state: KS
ship-to: *id001
specialDelivery: >
Follow the Yellow Brick
Road to the Emerald City.
Pay no attention to the
man behind the curtain.
...
```
### yaml - Dรฉfinition dโ€™une collection (-)
<!-- .slide: data-state="medium-code" -->
```yaml
# Une liste de fruits
fruits:
- pomme
- orange
- framboise
- mangue
```
Forme abrรฉgรฉe :
```yaml
# Une liste de fruits
fruits: ['pomme', 'orange', 'framboise', 'mangue']
```
### Dรฉfinition dโ€™un dictionnaire (key: value)
<!-- .slide: data-state="medium-code" -->
```yaml
# Un utilisateur
martin:
name: Martin Dupond
job: developer
skill: python
```
Forme abrรฉgรฉe :
```yaml
# Un utilisateur
martin: { name: Martin Dupond, job: developer, skill: python }
```
## Tasks
* Les commandes d'un Playbook sont dรฉcoupรฉes en instructions unitaires appelรฉes _tรขches_ (tasks).
* Chaque tรขche exรฉcute un module Ansible avec des paramรจtres spรฉcifiques.
* Format d'une tรขche :
```none
- name: Description de la tรขche
<nom-du-module>:
<paramรจtre-1>: <valeur-1>
<paramรจtre-2>: <valeur-2>
<paramรจtre-3>: <valeur-3>
```
### Liste de tรขches
* Un playbook peut dรฉcrire une liste de plusieurs tรขches.
* Les tรขches seront exรฉcutรฉes dans l'ordre d'apparition et de faรงon sรฉquentielle sur chacune des machines cibles.
```none
tasks: <----------------------------- liste de tรขche
- name: Ma tรขche 1 <--------------- tรขche 1
<nom-du-module>:
<paramรจtre-1>: <valeur-1>
<paramรจtre-2>: <valeur-2>
<paramรจtre-3>: <valeur-3>
- name: Ma tรขche 2 <--------------- tรขche 2
<nom-du-module>:
<paramรจtre-1>: <valeur-1>
<paramรจtre-2>: <valeur-2>
```
### Exemple rรฉel
<!-- .slide: data-state="medium-code" -->
```yaml
- hosts: web # exรฉcution d'un 'Play' sur le groupe 'web'
tasks:
- name: Installation of Apache Package # tรขche 1
yum:
name: httpd
state: present
update_cache: yes
- name: Ensure Apache is running (and enabled at boot) # tรขche 2
service: name=httpd state=started enabled=yes
```
* Ici on mixe les deux types de syntaxes (normale et abrรฉgรฉe).
* __Les bonnes pratiques prรฉconisent l'utilisation de la syntaxe normale.__
### Exemple rรฉel
avec syntaxe normale
<!-- .slide: data-state="medium-code" -->
```yaml
- hosts: web
tasks:
- name: Installation of Apache Package
yum:
name: httpd
state: present
update_cache: yes
- name: Ensure Apache is running (and enabled at boot)
service:
name: httpd
state: started
enabled: yes
```
### Notion de Play
<!-- .slide: data-state="medium-code" -->
```yaml
---
- hosts: webservers # Play 1 sur le groupe webservers
tasks:
- name: My task
...
- hosts: databases # Play 2 sur le groupe databases
tasks:
- name: My task...
...
```
* Chaque Play contient sa propre liste de tรขches et cible un ensemble spรฉcifique de machines.
## Lancer un playbook
<small>`$ ansible-playbook <fichier-playbook> -i <fichier-inventaire>`</small>
<!-- .slide: data-state="small-code" -->
```none
$ ansible-playbook playbook.yaml -i ./hosts
PLAY [web] *******************************************************************
TASK [setup] *****************************************************************
ok: [web1.formation.sii.fr]
ok: [web2.formation.sii.fr]
TASK [Installation du package Apache] ****************************************
changed: [web2.formation.sii.fr]
changed: [web1.formation.sii.fr]
TASK [Ensure Apache is running (and enable it at boot)] **********************
changed: [web1.formation.sii.fr]
changed: [web2.formation.sii.fr]
PLAY RECAP *******************************************************************
web1.formation.sii.fr : ok=3 changed=2 unreachable=0 failed=0
web2.formation.sii.fr : ok=3 changed=2 unreachable=0 failed=0
```
<small>
* Notre Playbook comportait 2 tรขches seulement, nous en voyons 3 !
* Ansible a automatiquement ajoutรฉ ร  l'exรฉcution une tรขche nommรฉe _setup_ dont l'objectif est de rรฉcupรฉrer les _facts_ des machines cibles.
<small>
## Rรฉcapitulatif du Playbook
<!-- .slide: data-state="small-code" -->
```none
PLAY RECAP *******************************************************************
web1.formation.sii.fr : ok=3 changed=2 unreachable=0 failed=0
web2.formation.sii.fr : ok=3 changed=2 unreachable=0 failed=0
```
* Sur les 2 machines cibles :
- `ok` : 3 tรขches ont รฉtรฉ exรฉcutรฉes avec succรจs.
- `changed` : 2 tรขches ont modifiรฉ l'รฉtat du systรจme.
- `unreachable` : Toutes les machines รฉtaient joignables.
- `failed` : Aucune tรขche n'a รฉchouรฉ.
## Relancer un playbook
<!-- .slide: data-state="small-code" -->
```none
$ ansible-playbook playbook.yaml -i ./hosts --become
PLAY [web] *******************************************************************
TASK [setup] *****************************************************************
ok: [web1.formation.sii.fr]
ok: [web2.formation.sii.fr]
TASK [Installation du package Apache] ****************************************
ok: [web1.formation.sii.fr]
ok: [web2.formation.sii.fr]
TASK [Ensure Apache is running (and enable it at boot)] **********************
ok: [web1.formation.sii.fr]
ok: [web2.formation.sii.fr]
PLAY RECAP *******************************************************************
web1.formation.sii.fr : ok=3 changed=0 unreachable=0 failed=0
web2.formation.sii.fr : ok=3 changed=0 unreachable=0 failed=0
```
## Premiรจre exรฉcution
<!-- .slide: data-state="small-code" -->
```none
PLAY RECAP *******************************************************************
web1.formation.sii.fr : ok=3 changed=2 unreachable=0 failed=0
web2.formation.sii.fr : ok=3 changed=2 unreachable=0 failed=0
```
## Seconde exรฉcution
```none
PLAY RECAP *******************************************************************
web1.formation.sii.fr : ok=3 changed=0 unreachable=0 failed=0
web2.formation.sii.fr : ok=3 changed=0 unreachable=0 failed=0
```
## Ordre d'exรฉcution
* Il est possible de contrรดler l'ordre dans lequel les machines cibles sont adressรฉes.
* L'ordre par dรฉfaut est l'ordre d'apparition dans l'inventaire.
```yaml
- hosts: all
order: sorted # l'ordre est dรฉfini ici
gather_facts: False
tasks:
- debug:
var: inventory_hostname
```
Ordre | Description
- | -
`inventory` | Ordre d'apparition dans l'inventaire. C'est le choix par dรฉfaut.
`reverse_inventory` | Ordre inverse d'apparition dans l'inventaire.
`sorted` | Ordre alphabรฉtique des noms de machines.
`reverse_sorted` | Ordre alphabรฉtique inverse des noms de machines.
`shuffle` | Ordre alรฉatoire.
## Dรฉmarrer l'exรฉcution ร  un endroit prรฉcis
`$ ansible-playbook playbook.yaml --start-at-task="my task"`
Cette commande dรฉmarre l'exรฉcution du playbook ร  partir de la tรขche nommรฉe `my task`.
<small>https://docs.ansible.com/ansible/latest/user_guide/playbooks_startnstep.html</small>
## Ignorer le code de retour d'une commande
* Les modules _command_ et _shell_ sont sensibles au code de retour des commandes.
* Pour ignorer les erreurs sur une commande qui renvoie un code > 0 on peut utiliser `ignore_errors`.
* Ou, utiliser `failed_when`.
* De mรชme, `changed_when` peut รชtre utilisรฉ.
```yaml
tasks:
- name: run this command and ignore the result
shell: /usr/bin/somecommand
ignore_errors: True
```
## Dรฉclaration de variables
```yaml
- hosts: web
vars:
- app_directory: /var/www/html
- app_user: apache
- app_group: apache
tasks:
- name: Modify permission on {{ app_directory }}
file:
dest: '{{ app_directory }}'
mode: 0755
owner: '{{ app_user }}'
group: '{{ app_group }}'
recurse: yes
```
Les variables sont dรฉclarรฉes dans _vars_
et rรฉsolues avec `{{ }}`.
<!-- .slide: data-state="small-code" -->
```none
$ ansible-playbook playbook.yaml -i ./hosts
PLAY [web] ****************************************************************
TASK [setup] **************************************************************
ok: [web1.formation.sii.fr]
ok: [web2.formation.sii.fr]
TASK [Modify permission of directory /var/www/html] ***********************
changed: [web1.formation.sii.fr]
changed: [web2.formation.sii.fr]
PLAY RECAP ****************************************************************
web1.formation.sii.fr : ok=2 changed=1 unreachable=0 failed=0
web2.formation.sii.fr : ok=2 changed=1 unreachable=0 failed=0
```
## Les _handlers_ et les _notify_
<!-- .slide: data-state="medium-code" -->
```yaml
- hosts: web
vars:
- apache_listen_port: 8080
tasks:
- name: Modify Apache configuration
lineinfile:
dest: /etc/httpd/conf/httpd.conf
regexp: '^Listen '
line: 'Listen {{ apache_listen_port }}'
notify: Reload Apache # Signale que la configuration
# d'Apache doit รชtre rechargรฉe
handlers:
- name: Reload Apache # Recharge la configuration
service:
name: httpd
state: reloaded
```
<!-- .slide: data-state="small-code" -->
```none
$ ansible-playbook playbook.yaml -i ./hosts
PLAY [web] *******************************************************************
TASK [setup] *****************************************************************
ok: [web1.formation.sii.fr]
ok: [web2.formation.sii.fr]
TASK [Modify Apache configuration] *******************************************
changed: [web1.formation.sii.fr]
changed: [web2.formation.sii.fr]
RUNNING HANDLER [Reload Apache] *********************************************
changed: [web1.formation.sii.fr]
changed: [web2.formation.sii.fr]
PLAY RECAP *******************************************************************
web1.formation.sii.fr : ok=3 changed=2 unreachable=0 failed=0
web2.formation.sii.fr : ok=3 changed=2 unreachable=0 failed=0
```
## Idempotence
* L'idempotence signifie qu'une opรฉration a le mรชme effet qu'on l'applique une ou plusieurs fois.
* Les commandes d'un Playbook doivent รชtre รฉcrites de maniรจre ร  produire le mรชme rรฉsultat quel que soit le nombre de fois oรน elles sont exรฉcutรฉes sur une mรชme cible.
<!-- .slide: data-state="nologo-slide" style="text-align: center" -->
## Travaux pratiques
![Travaux pratiques](images/tp.gif)
<small>[TP Ansible : playbooks](travaux-pratiques/tp-ansible-playbooks.html)</small>
## Variables sur la ligne de commande
Il est possible d'initialiser des variables directement sur la ligne de commande avec l'option `--extra-vars` (ou `-e`).
* Ces variables peuvent รชtre dรฉfinies sous la forme :
- chaรฎne de caractรจres
`$ ansible-playbook playbook.yaml --extra-vars "my_var_1=foo my_var_2=bar"`
- json
`$ ansible-playbook playbook.yaml --extra-vars '{"my_var_1":"foo","my_var_2":"bar"}'`
`$ ansible-playbook playbook.yaml --extra-vars '{"my_var":"foo","my_list":["foo","bar"]}'`
* Utilisez le fomat _json_ si vous voulez passer autre chose que des _strings_ :
- booleans
- integers
- floats
- lists
- ...
## Dรฉcouper un Playbook
* Un Playbook peut se prรฉsenter sous la forme d'un fichier unique.
* Toutefois il est possible de le dรฉcouper en plusieurs fichiers sรฉparรฉs afin de mieux organiser et favoriser la rรฉ-utilisation de certaines parties.
* Il existe plusieurs maniรจres de dรฉcouper un Playbook :
les _includes_, les _imports_, et les _roles_.
<small>https://docs.ansible.com/ansible/latest/user_guide/playbooks_reuse.html</small>
### Includes et Imports
* Disponibles ร  partir de Ansible v2.4.
* Permettent le dรฉcoupage des tรขches d'un gros Playbook en fichiers plus petits.
* Ces fichiers peuvent ensuite รชtre appelรฉs :
- depuis un ou plusieurs Playbooks
- plusieurs fois dans un mรชme Playbook.
### Import dynamique vs statique
* Les commandes `import` permettent
un chargement statique.
<small>(import_playbook, import_tasks, etc.)</small>
* Les commandes `include` permettent
un chargement dynamique.
<small>(include_tasks, include_role, etc.)</small>
### Statique vs Dynamique
* _Statique_
Ansible traite les imports statique au moment de l'analyse du Playbook (avant l'exรฉcution).
* _Dynamique_
Ansible traite les imports dynamiques au fur et ร  mesure durant l'exรฉcution du Playbook.
* Les imports statiques et dynamiques peuvent รชtre mixรฉs, toutefois cela n'est pas recommandรฉ car cela rend le debug des Playbooks plus complexe.
### Import de Playbooks
* Il est possible d'importer un ou plusieurs Playbooks ร  l'intรฉrieur d'un Playbook maรฎtre, avec `import_playbook`.
### Roles
* Plus puissants que les _includes_ et les _imports_.
* Permettent d'empaqueter un ensemble de tรขches ainsi que les variables, handlers et autres autres รฉlรฉments associรฉs.
* Les _roles_ peuvent รชtre facilement rรฉ-utilisรฉs et partagรฉs.
<!-- .slide: data-state="nologo-slide" style="text-align: center" -->
## Travaux pratiques
![Travaux pratiques](images/tp.gif)
<small>[TP Ansible : imports](travaux-pratiques/tp-ansible-imports.html)</small>

409
Pepiniere/ansible/Formation/5.roles.md

@ -1,409 +0,0 @@
<!-- .slide: data-state="nologo-slide" style="text-align: center" -->
![Logo Ansible](images/logo-ansible.svg)
# Roles Ansible
Les Roles permettent d'organiser les instructions Ansible de maniรจre ร  favoriser leur rรฉ-utilisabilitรฉ.
![Schรฉma archi globale](images/ansible-archi-roles.png)
## Qu'est-ce qu'un Role ?
* Un Role Ansible dรฉfini une action prรฉcise telle que :
- Installer et configurer un serveur Apache
- Installer et configurer un serveur Mariadb
* Un Role Ansible peut รชtre appelรฉ dans un ou plusieurs Playbook.
## Avantages des Roles
* Organisation
- Dรฉcoupage en plusieurs dossiers et fichiers
- Facilite la comprรฉhension et la maintenance du code.
* Rรฉ-utilisabilitรฉ
- Les Roles peuvent facilement รชtre rรฉ-utilisรฉs au sein de plusieurs Playbooks.
* Partage
- Les Roles peuvent รชtre partagรฉs sous la forme de catalogues.
## Organisation d'un Role
<!-- .slide: data-state="small-code" -->
```none
roles/
โ”œโ”€โ”€ my-role
โ”‚ย ย  โ”œโ”€โ”€ README.md
โ”‚ย ย  โ”œโ”€โ”€ defaults <= Variables par dรฉfaut du Role
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ main.yaml
โ”‚ย ย  โ”œโ”€โ”€ files <= Fichiers pouvant รชtre dรฉployรฉs par le Role
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ my-file.yaml
โ”‚ย ย  โ”œโ”€โ”€ handlers <= Handlers ร  exรฉcuter
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ main.yaml
โ”‚ย ย  โ”œโ”€โ”€ meta <= Mรฉtadonnรฉes sur le Role
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ main.yaml
โ”‚ย ย  โ”œโ”€โ”€ tasks <= Tรขches ร  exรฉcuter
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ main.yaml
โ”‚ย ย  โ””โ”€โ”€ templates <= Templates de fichiers
โ”‚ย ย  โ”‚ โ””โ”€โ”€ my-template.j2
โ”‚ย ย  โ””โ”€โ”€ vars <= Autres variables pour le Role
โ”‚ย ย  โ””โ”€โ”€ main.yaml
```
* Un Role doit inclure au minimum un des dossiers suivants
`defaults`, `files`, `handlers`, `tasks`, `templates`, `vars`.
* Si un dossier est dรฉclarรฉ, il doit contenir au minimum un fichier nommรฉ `main.yaml`.
## Utiliser un Role
La mรฉthode classique est la suivante :
`playbook.yaml`
```yaml
- hosts: my-group-of-servers
roles:
- my-role-1
- my-role-2
```
## Ordre d'exรฉcution des tรขches
L'ordre d'exรฉcution des tรขches
dans un Playbook est le suivant :
1. Tรขches dรฉfinies dans `pre_tasks`
2. Handlers dรฉclenchรฉs jusque lร 
3. Tรขches dรฉfinies dans `roles`
4. Tรขches dรฉfinies dans le playbook (`tasks`)
5. Handlers dรฉclenchรฉs jusque lร 
6. Tรขches dรฉfinies dans `post_tasks`
7. Handlers dรฉclenchรฉs jusque lร 
## pre_tasks, post_tasks
* _tasks_
Tรขches dรฉfinies dans la section `tasks`. Elles sont lancรฉes aprรจs les Rรดles et avant les tรขches dรฉfinies dans `post_tasks`.
* _pre_tasks_
Tรขches lancรฉes avant les Rรดles.
* _post_tasks_
Tรขches lancรฉes aprรจs les tรขches de la section `tasks`
(et donc aprรจs les Rรดles).
## Exemple
Dรฉfinition de pre_tasks, roles, tasks et post_tasks.
<!-- .slide: data-state="small-code" -->
```yaml
- hosts: ansible-1
pre_tasks:
- name: Pre tasks
debug:
msg: 'I am executed before the Roles.'
roles:
- my-role
tasks:
- name : Tasks
debug:
msg: 'I am executed right after the Roles and just before the Post Tasks.'
post_tasks:
- name: Post tasks
debug:
msg: 'I am executed after the main Tasks.'
```
L'ordre de dรฉclaration n'a pas d'importance.
## Ordre rรฉel d'exรฉcution
<!-- .slide: data-state="small-code" -->
```none
$ ansible-playbook -v -i inventories/formation/hosts my-playbook.yaml
PLAY [ansible-1] *******************************************************
TASK [Pre tasks] ***************************************************************
ok: [ansible-1] => {
"msg": "I am executed before the Roles."
}
TASK [my-role : Role] **********************************************************
ok: [ansible-1] => {
"msg": "I am running after Pre Tasks and before Tasks."
}
TASK [Tasks] *******************************************************************
ok: [ansible-1] => {
"msg": "I am executed right after the Roles and just before the Post Tasks."
}
TASK [Post tasks] **************************************************************
ok: [ansible-1] => {
"msg": "I am executed after the main Tasks."
}
...
```
## Exemple de dรฉcoupage en Roles
`playbook.yaml`
```yaml
- hosts: web
roles:
- apache
- wordpress
```
Le Playbook exรฉcute les Roles `apache` et `wordpress`.
### Tรขches du Role apache
<!-- .slide: data-state="medium-code" -->
`roles/install-apache/tasks/install.yaml`
```yaml
- name: Installation of Apache Package
yum:
name: httpd
state: present
update_cache: yes
- name: Ensure Apache is running (and enable it at boot)
service:
name: httpd
state: started
enabled: yes
```
### Tรขches du Role apache (suite)
<!-- .slide: data-state="medium-code" -->
`roles/configure-apache/tasks/configure.yaml`
```yaml
- name: Modify permission of directory {{ app_directory }}
file:
dest: '{{ app_directory }}'
mode: 0755
owner: '{{ app_user }}'
group: '{{ app_group }}'
recurse: yes
- name: Modify Apache configuration
lineinfile:
dest: /etc/httpd/conf/httpd.conf
regexp: '^Listen '
line: 'Listen {{ apache_listen_port }}'
notify: Reload Apache
```
### Variables du Role apache
<!-- .slide: data-state="medium-code" -->
`roles/configure-apache/vars/main.yaml`
```yaml
apache_listen_port: 8081
app_directory: /var/www/html
app_user: apache
app_group: apache
```
### Handlers du Role apache
<!-- .slide: data-state="medium-code" -->
`roles/configure-apache/handlers/main.yaml`
```yaml
- name: Reload Apache
service:
name: httpd
state: reloaded
```
### Exรฉcution du playbook
<!-- .slide: data-state="small-code" -->
```none
$ ansible-playbook -i ./hosts playbook.yaml
PLAY [web] *********************************************************************
TASK [setup] *******************************************************************
ok: [web1.formation.sii.fr]
ok: [web2.formation.sii.fr]
TASK [apache : Installation of Apache Package] *********************************
ok: [web2.formation.sii.fr]
ok: [web1.formation.sii.fr]
TASK [apache : Ensure Apache is running (and enable it at boot)] ***************
ok: [web1.formation.sii.fr]
ok: [web2.formation.sii.fr]
TASK [apache : Modify permission of directory /var/www/html] *******************
ok: [web1.formation.sii.fr]
ok: [web2.formation.sii.fr]
TASK [apache : Modify Apache configuration] ************************************
changed: [web1.formation.sii.fr]
changed: [web2.formation.sii.fr]
RUNNING HANDLER [apache : Reload Apache] ***************************************
changed: [web1.formation.sii.fr]
changed: [web2.formation.sii.fr]
PLAY RECAP *********************************************************************
web1.formation.sii.fr : ok=6 changed=2 unreachable=0 failed=0
web2.formation.sii.fr : ok=6 changed=2 unreachable=0 failed=0
```
Les Roles sont exรฉcutรฉs sรฉquentiellement.
## Importer des fichiers de tรขches
* Dans un Role le fichier `tasks/main.yaml` peut appeler d'autres fichiers contenant des tรขches avec `import_tasks` ou `include_tasks`.
* Exemple :
`roles/my-role/tasks/main.yaml`
```yaml
tasks:
- import_tasks: install.yaml
- import_tasks: configure.yaml
# ou
- include_tasks: install.yaml
- include_tasks: configure.yaml
```
## Gรฉrer un import par type d'OS
* L'import de tรขches permet notamment de gรฉrer les diffรฉrences d'implรฉmentations entre systรจmes.
* Exemple :
`roles/my-role/tasks/main.yaml`
```yaml
- name: specific redhat/centos tasks
import_tasks: redhat.yaml
when: ansible_facts['os_family']|lower == 'redhat'
- name: specific debian/ubuntu tasks
import_tasks: debian.yaml
when: ansible_facts['os_family']|lower == 'debian'
```
`roles/my-role/tasks/redhat.yaml`
```yaml
- yum:
name: "httpd"
state: present
```
`roles/my-role/tasks/debian.yaml`
```yaml
- apt:
name: "apache2"
state: present
```
Il est possible de passer des variables aux tรขches importรฉes :
```yaml
tasks:
- import_tasks: wordpress.yaml
vars:
wp_user: bob
```
## Exรฉcution partielle d'un Playbook
<!-- .slide: data-state="medium-code" -->
* L'utilisation de _tags_ permet l'exรฉcution ciblรฉe d'un sous-ensemble de tรขches.
```yaml
- hosts: web
roles:
- { role: install-apache, tags: install }
- { role: configure-apache, tags: [install, configure] }
```
* Lors du lancement du playbook, le ciblage s'effectue avec `--tags` ou `--skip-tags`.
<!-- .slide: data-state="small-code" -->
```none
$ ansible-playbook playbook.yaml -i ./hosts --tags configure
PLAY [web] *********************************************************************
TASK [setup] *******************************************************************
ok: [web1.formation.sii.fr]
ok: [web2.formation.sii.fr]
TASK [configure-apache : Modify permission of directory /var/www/html] *********
changed: [web1.formation.sii.fr]
changed: [web2.formation.sii.fr]
TASK [configure-apache : Modify Apache configuration] **************************
changed: [web1.formation.sii.fr]
changed: [web2.formation.sii.fr]
RUNNING HANDLER [configure-apache : Reload Apache] *****************************
changed: [web1.formation.sii.fr]
changed: [web2.formation.sii.fr]
PLAY RECAP *********************************************************************
web1.formation.sii.fr : ok=4 changed=3 unreachable=0 failed=0
web2.formation.sii.fr : ok=4 changed=3 unreachable=0 failed=0
```
## Dรฉpendances entre Roles
* Un Role peut dรฉpendre d'un ou plusieurs autres Roles.
* Les dรฉpendances d'un Role peuvent รชtre indiquรฉes dans le fichier : `roles/mon-role/meta/main.yaml`
`roles/my-appli/meta/main.yaml`
```yaml
dependencies:
- role: common
- role: apache
vars:
apache_port: 80
```
* Ici les Roles `common` et `apache` seront exรฉcutรฉs
avant le role `mon-appli`.
* Attention : les Roles marquรฉs en dรฉpendances
seront exรฉcutรฉs sur les mรชmes machines cibles
que le Role `mon-appli`.
## Travaux pratiques
<!-- .slide: data-state="nologo-slide" style="text-align: center" -->
![Travaux pratiques](images/tp.gif)
<small>[TP Ansible : roles](travaux-pratiques/tp-ansible-roles.html)</small>

385
Pepiniere/ansible/Formation/6.structures-de-controle.md

@ -1,385 +0,0 @@
<!-- .slide: data-state="nologo-slide" style="text-align: center" -->
![Logo Ansible](images/logo-ansible.svg)
# Structures de contrรดle
## _Facts_
* Variables dรฉlivrรฉes par le systรจme distant :
- Adresses IP
- Systรจme d'exploitation
- ...
## Facts - module setup
* Liste des informations disponibles : module _setup_
<!-- .slide: data-state="medium-code" -->
```none
$ ansible my-host -i ./hosts -m setup
my-host | SUCCESS => {
"ansible_facts": {
"ansible_all_ipv4_addresses": [
"10.6.214.74"
],
"ansible_all_ipv6_addresses": [
"fe80::250:56ff:fe9d:1aaa"
],
"ansible_architecture": "x86_64",
...
```
### Facts pour la gestion multi-os
* `ansible_pkg_mgr` : Le gestionnaire de paquets
* `ansible_os_family` : La famille d'OS
* `ansible_distribution` : Information dรฉtaillรฉes sur la distribution
### Gestionnaire de paquets
<!-- .slide: data-state="medium-code" -->
```none
$ ansible my-host -i ./hosts -m setup | grep ansible_pkg_mgr
"ansible_pkg_mgr": "yum",
```
### Famille d'OS
<!-- .slide: data-state="medium-code" -->
```none
$ ansible my-host -i ./hosts -m setup | grep ansible_family
"ansible_os_family": "RedHat",
```
### Distribution
<!-- .slide: data-state="medium-code" -->
```none
$ ansible my-host -i ./hosts -m setup | grep ansible_distribution
"ansible_distribution": "CentOS",
"ansible_distribution_file_parsed": true,
"ansible_distribution_file_path": "/etc/redhat-release",
"ansible_distribution_file_variety": "RedHat",
"ansible_distribution_major_version": "7",
"ansible_distribution_release": "Core",
"ansible_distribution_version": "7.5.1804",
```
### Exemple d'aiguillage multi-OS
<!-- .slide: data-state="small-code" -->
Arborescence du rรดle
```none
my-role
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ tasks
โ”‚ย ย  โ”œโ”€โ”€ CentOS.yaml -> RedHat.yaml
โ”‚ย ย  โ”œโ”€โ”€ Debian.yaml
โ”‚ย ย  โ”œโ”€โ”€ main.yaml
โ”‚ย ย  โ”œโ”€โ”€ RedHat.yaml
โ”‚ย ย  โ””โ”€โ”€ Ubuntu.yaml -> Debian.yaml
โ””โ”€โ”€ vars
ย ย  โ”œโ”€โ”€ CentOS-6.yaml
ย ย  โ”œโ”€โ”€ CentOS-7.yaml
ย ย  โ”œโ”€โ”€ Debian-8.yaml
ย ย  โ”œโ”€โ”€ Debian-9.yaml
ย ย  โ”œโ”€โ”€ RedHat-6.yaml
ย ย  โ”œโ”€โ”€ RedHat-7.yaml
ย ย  โ””โ”€โ”€ Ubuntu-16.yaml
```
<!-- .slide: data-state="medium-code" -->
`my-role/tasks/main.yaml`
```yaml
- name: Add the OS specific variables
include_vars: '{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yaml'
- include_tasks: '{{ansible_distribution}}.yaml'
```
## Utilisation des _conditionals_
* Action dรฉclenchรฉe de maniรจre conditionnelle
(en fonction du rรฉsultat dโ€™une variable).
* Utilisation de _when_.
<small>https://docs.ansible.com/ansible/playbooks_conditionals.html</small>
### Exemple
<!-- .slide: data-state="small-code" -->
```yaml
- hosts: web
tasks:
- name: Install Apache for CentOS system
yum:
name: httpd
state: present
update_cache: yes
when:
- ansible_os_family == "RedHat" # sera jouรฉ sur RedHat et Centos
- name: Install Apache for Ubuntu system
apt:
name: apache2
state: present
update_cache: yes
when:
- ansible_os_family == "Debian" # sera jouรฉ sur Debian et Ubuntu
```
Chaque tรขche cible une famille
de systรจme d'exploitation prรฉcise.
<!-- .slide: data-state="small-code" -->
```none
$ ansible-playbook playbook.yaml -i ./hosts
PLAY [web] *******************************************************************
TASK [setup] *****************************************************************
ok: [centos-vm]
ok: [ubuntu-vm]
TASK [Install Apache for CentOS system] **************************************
ok: [centos-vm]
skipping: [ubuntu-vm]
TASK [Install Apache for Ubuntu system] **************************************
skipping: [centos-vm]
ok: [ubuntu-vm]
PLAY RECAP *******************************************************************
centos-vm : ok=2 changed=0 unreachable=0 failed=0
ubuntu-vm : ok=2 changed=0 unreachable=0 failed=0
```
Les tรขches sont exรฉcutรฉes ou non en fonction
de la famille du systรจme d'exploitation.
## Utilisation des _loops_
* Boucles pour la rรฉalisation d'actions rรฉpรฉtitives.
* Permet de faire plusieurs actions dans une seule tรขche.
* Crรฉation d'utilisateurs, installation de paquets, ...
* Utilisation de ~~with-x~~ _loop_
<small>https://docs.ansible.com/ansible/playbooks_loops.html</small>
### with-x
<!-- .slide: data-state="small-table" -->
Paramรจtre | Type | Example d'utilisation
- | - | -
`with_items` | Array | To create a group of users, directories, or to install a list of packages
`with_nested` | Nested loops | To create a list of MySQL users and grant them access to a group of databases
`with_dict` | Hashes | To parse a dictionary of key-value pairs and create virtual hosts
`with_fileglobs` |Files with pattern match | To parse a path and copy only those files that match a certain pattern
`with_together` | S ets | To join two arrays as a set and to loop over it
`with_subelements` | Hash sub element | To walk over the list of SSH keys and distribute them to a user
`with_sequence` | Integer sequence | To loop a sequence of numbers
`with_random_choice` | Random choice | To pick up items from the array in a random order
`with_indexed_items` | Array with index | Array with an index and is useful when an index for items is required
### Exemple avec with_items
```yaml
- hosts: my-host
tasks:
- name: Add some users
user:
name: "{{ item }}"
state: present
with_items:
- bob
- alice
- joe
```
Attention ! ร  partir d'Ansible 2.5 _with-x_ n'est plus la mรฉthode recommandรฉ pour effectuรฉ des boucles.
<!-- .slide: data-state="small-code" -->
```none
$ ansible-playbook playbook.yaml -i ./hosts
PLAY [my-host] ***************************************************************
TASK [setup] *****************************************************************
ok: [my-host]
TASK [Add some users] ********************************************************
changed: [my-host] => (item=bob)
changed: [my-host] => (item=alice)
changed: [my-host] => (item=joe)
PLAY RECAP *******************************************************************
my-host : ok=2 changed=1 unreachable=0 failed=0
```
La boucle a bien itรฉrรฉ sur les 3 utilisateurs.
### Migration vers loop
* A partir d'Ansible 2.5 _with-x_ n'est plus la mรฉthode recommandรฉe pour effectuer des boucles.
* La documentation sur les boucles propose une section pour aider ร  la migration de _with-x_ vers _loop_.
<small>https://docs.ansible.com/ansible/latest/user_guide/playbooks_loops.html</small>
### Exemple avec loop
```yaml
- hosts: my-host
tasks:
- name: Add some users
user:
name: "{{ item }}"
state: present
loop:
- bob
- alice
- joe
```
On remplace simplement `with_items` par `loop`.
<!-- .slide: data-state="small-code" -->
```none
$ ansible-playbook -i inventories/formation/hosts playbook.yaml
PLAY [my-host] ***************************************************************
TASK [Gathering Facts] *******************************************************
ok: [my-host]
TASK [Add some users] ********************************************************
changed: [my-host] => (item=bob)
changed: [my-host] => (item=alice)
changed: [my-host] => (item=joe)
PLAY RECAP *******************************************************************
my-host : ok=2 changed=1 unreachable=0 failed=0
```
Le rรฉsultat final est strictement identique.
```yaml
- hosts: my-host
tasks:
- name: Add some users
user:
name: "{{ item.name }}"
state: present
groups: "{{ item.groups }}"
loop:
- { name: 'bob', groups: 'wheel' }
- { name: 'alice', groups: 'root' }
- { name: 'joe', groups: 'root' }
```
En plus des _strings_ , il est possible d'utiliser des _hashes_.
### Itรฉrer sur l'inventaire
<!-- .slide: data-state="small-code" -->
```yaml
- hosts: centos7
tasks:
- name: Iterate on hosts in the group all in the inventory
debug:
msg: "{{ item }}"
loop: "{{ groups['all'] }}" # on itรจre sur les machines du groupe all
```
```none
$ ansible-playbook -i ./hosts playbook.yaml
PLAY [centos7] *****************************************************************
TASK [Iterate on hosts in the group all in the inventory] **********************
ok: [ansible-1] => (item=ansible-3) => {
"msg": "ansible-3"
}
ok: [ansible-1] => (item=ansible-1) => {
"msg": "ansible-1"
}
ok: [ansible-1] => (item=ansible-2) => {
"msg": "ansible-2"
}
ok: [ansible-2] => (item=ansible-3) => {
"msg": "ansible-3"
}
ok: [ansible-2] => (item=ansible-1) => {
"msg": "ansible-1"
}
ok: [ansible-2] => (item=ansible-2) => {
"msg": "ansible-2"
}
```
Chaque machine du Play (_centos7_) itรจre sur le groupe _all_.
### Itรฉrer sur le Play
<!-- .slide: data-state="small-code" -->
```yaml
- hosts: centos7
tasks:
- name: Iterate on all the hosts in the current play
debug:
msg: "{{ item }}"
loop: "{{ ansible_play_batch }}" # variable qui contient les machines du Play
```
```none
$ ansible-playbook -i inventories/formation/hosts playbook.yaml
PLAY [centos7] *****************************************************************
TASK [Iterate on all the hosts in the current play] ****************************
ok: [ansible-1] => (item=ansible-1) => {
"msg": "ansible-1"
}
ok: [ansible-1] => (item=ansible-2) => {
"msg": "ansible-2"
}
ok: [ansible-2] => (item=ansible-1) => {
"msg": "ansible-1"
}
ok: [ansible-2] => (item=ansible-2) => {
"msg": "ansible-2"
}
```
Chaque machine du Play (_centos7_) itรจre
sur les machines du Play (_centos7_).
## Travaux pratiques
<!-- .slide: data-state="nologo-slide" style="text-align: center" -->
![Travaux pratiques](images/tp.gif)
<small>[TP Ansible : structures de contrรดle](travaux-pratiques/tp-ansible-structures-de-controle.html)</small>

516
Pepiniere/ansible/Formation/7.templates.md

@ -1,516 +0,0 @@
<!-- .slide: data-state="nologo-slide" style="text-align: center" -->
![Logo Ansible](images/logo-ansible.svg)
# Templates
## Syntaxe jinja2
* Documentation
- Jinja language :
http://jinja.pocoo.org/docs/
- Template formatting :
http://jinja.pocoo.org/docs/templates/
## Principe
* On crรฉรฉ les fichiers dans le dossier `templates` du Role.
* On indique l'emplacement des zones variables ร  l'aide de la syntaxe `{{ ma_variable }}`.
`templates/httpd.conf.j2`
```none
...
Listen {{ apache_port }}
DocumentRoot {{ apache_document_root }}
ServerName {{ apache_server_name }}
ServerAdmin {{ apache_server_admin }}
...
```
On utilise le module _template_
<!-- .slide: data-state="medium-code" -->
```yaml
- hosts: web
vars:
apache_port: 80
apache_document_root: /var/www/html
apache_server_name: my-server
apache_server_admin: admin@localhost
tasks:
- name: Deploy Apache configuration
template:
src: templates/httpd.conf.j2
dest: /etc/http/httpd.conf
owner: apache
group: apache
mode: 0600
```
Les variables sont automatiquement injectรฉes dans le fichier sur la cible.
## Exemple pour une configuration du service NTP
<!-- .slide: data-state="small-code" -->
`./group_vars/all`
```none
ntp_servers:
- 0.pool.ntp.org
- 1.pool.ntp.org
- 2.pool.ntp.org
- 3.pool.ntp.org
```
`./roles/ntp/templates/ntp.conf.j2`
```none
...
{% for server in ntp_servers %}
server {{ server }}
{% endfor %}
...
```
`./roles/ntp/tasks/main.yaml`
```yaml
- name: Install NTP package
apt:
name: "ntp"
- name: Configure NTP
template:
src: ntp.conf.j2
dest: "/etc/ntp.conf"
owner: "root"
group: "root"
mode: 0644
notify: Restart ntp service
```
## Contrรดle conditionnel
```none
{% if condition %}
do_some_thing
{% elif condition2 %}
do_another_thing
{% else %}
do_something_else
{% endif %}
```
## Filtres
Les variables peuvent รชtre modifiรฉes par des filtres.
<small>https://docs.ansible.com/ansible/playbooks_filters.html</small>
### Filtres Jinja2
* Les filtres Ansible reposent sur Jinja2.
* Ils sont utilisรฉs pour transformer des donnรฉes.
* Les filtres peuvent รชtre chaรฎnรฉs.
* Il est possible de crรฉer des filtres personnalisรฉs.
### Fixer une valeur par dรฉfaut aux variables non-dรฉfinies
```none
{{ variable | default(5) }}
```
### Formater des donnรฉes
```none
{{ variable | to_json }}
{{ variable | to_yaml }}
```
```none
{{ variable | from_json }}
{{ variable | from_yaml }}
```
### Filtres de listes
Rรฉcupรฉrer les valeurs minimales ou maximales
```none
{{ ma_liste | min }}
{{ [3, 4, 2] | max }}
```
Eliminer les doublons
```none
{{ list1 | unique }}
```
Combiner deux listes
```none
{{ list1 | union(list2) }}
```
Obtenir la diffรฉrence entre deux listes (รฉlรฉments dans list1 qui n'existent pas dans list2)
```none
{{ list1 | difference(list2) }}
```
### Filtres de nombres alรฉatoires
Obtenir un รฉlรฉment au hasard parmi une liste
```none
"{{ ['a','b','c'] | random }}"
# => 'c'
```
Obtenir un nombre au hasard entre 0 et une valeur spรฉcifiรฉe
```none
"{{ 60 | random}} * * * * root /script/from/cronโ€œ
# => '21 * * * * root /script/from/cron'
```
Obtenir un nombre au hasard entre 0 et 100 par pas de 10
```none
{{ 101 | random(step=10) }}
# => 70
```
### Tester des adresses IP
Tester si une chaรฎne est une adresse IP valide
```none
{{ myvar | ipaddr }}
```
Mรชme chose en forรงant la version du protocole IP
```none
{{ myvar | ipv4 }}
{{ myvar | ipv6 }}
```
### Filtres sur la notation CIDR
```none
{{ '192.0.2.1/24' | ipaddr('address') }}
'192.0.2.1/24'
```
```none
{{ '192.0.2.1/24' | ipaddr('prefix') }}
'24'
```
<small>https://docs.ansible.com/ansible/playbooks_filters_ipaddr.html</small>
### Fonctions de hashage
Obtenir l'empreinte sha1 ou md5 d'une chaรฎne
```none
{{ 'test1' | hash('sha1') }}
'dba7673010f19a94af4345453005933fd511bea9'
{{ 'test1' | hash('md5') }}
'3e7705498e8be60520841409ebc69bc1'
```
<small>https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html#hashing-filters</small>
<!-- .slide: data-state="medium-code" -->
Obtenir un hashage de mot de passe sha512
```none
{{ 'passwordsaresecret' | password_hash('sha512') }}
```
Obtenir un hashage de mot de passe sha256 avec salage
```none
{{ 'secretpassword' | password_hash('sha256', 'mysecretsalt') }}
```
Exemple d'utilisation dans un fichier de variables
```none
user_password: "{{ 'Mon super password' | password_hash('sha256') }}"
```
### Filtres de commentaires
Il permettent de "dรฉcorer" un texte
avec un style de commentaire.
Exemple :
```none
{{ "Hello" | comment }}
```
produit :
```none
#
# Hello
#
```
Il est possible d'appliquer
diffรฉrents types de commentaires :
```none
{{ "C style" | comment('c') }}
'// C style'
```
```none
{{ "C block style" | comment('cblock') }}
'/* C block style */'
```
```none
{{ "XML style" | comment('xml') }}
'<!--XML style-->'
```
### Filtres d'URL
<!-- .slide: data-state="small-code medium-table" -->
Obtenir une sous-partie d'une URL.
```none
{{ "http://bob:1234@www.test.com:81/dir/index.html?query=term#fragment"
| urlsplit('scheme') }}
# => 'http'
```
Filtre | Rรฉsultat
- | -
urlsplit('scheme') | 'http'
urlsplit('username') | 'bob'
urlsplit('password') | '1234'
urlsplit('hostname') | 'www.test.com'
urlsplit('port') | '81'
urlsplit('path') | '/dir/index.html'
urlsplit('query') | 'query=term'
urlsplit('fragment') | 'fragment'
### Autres filtres utiles
Ajouter des guillemets pour protรฉger des variables
(usage shell)
```none
- shell: echo {{ string_value | quote }}
```
Retourner une valeur si un test est vrai
et une autre si il est faux
```none
{{ (name == "John") | ternary('Mr','Mme') }}
```
Concatener une liste en chaรฎne
```none
{{ list | join(" ") }}
```
```none
{{ list | join(",") }}
```
Obtenir le dernier รฉlรฉment d'un chemin
```none
{{ '/etc/foo/bar.txt' | basename }}
'bar.txt'
```
Obtenir le dรฉbut d'un chemin
```none
{{ '/etc/foo/bar.txt' | dirname }}
'/etc/foo'
```
Obtenir le chemin rรฉel d'un lien
```none
{{ path | realpath }}
```
Expanser un chemin contenant un tilde (~)
```none
{{ path | expanduser }}
```
Expanser un chemin contenant des variables d'environnement
```none
{{ path | expandvars }}
```
Dรฉcouper un nom de fichier
```none
{{ path | splitext }}
```
Avec `path` == `nginx.conf` le retour sera `('nginx', '.conf')`
## Tests
`variable` is `test expression`
<small>https://docs.ansible.com/ansible/playbooks_tests.html</small>
### Tester des chaรฎnes de caractรจres
<!-- .slide: data-state="small-code" -->
```yaml
vars:
url: "http://example.com/users/foo/resources/bar"
tasks:
- debug:
msg: "matched pattern 1"
when: url is match("http://example.com/users/.*/resources/.*")
- debug:
msg: "matched pattern 2"
when: url is search("/users/.*/resources/.*")
- debug:
msg: "matched pattern 3"
when: url is search("/groups/")
```
```none
TASK [debug] *****************************************************************
ok: [my-host] => { "msg": "matched pattern 1" }
TASK [debug] *****************************************************************
ok: [my-host] => { "msg": "matched pattern 2" }
TASK [debug] *****************************************************************
skipping: [my-host]
```
### Tester des numรฉros de version
Si `ansible_facts['distribution_version']` est supรฉrieur ou รฉgal ร  16.04, le test retourne `True`, sinon il retourne `False`.
<!-- .slide: data-state="medium-code" -->
```none
{{ ansible_facts['distribution_version'] is version('16.04', '>=') }}
```
Opรฉrateurs acceptรฉs :
`<`, `lt`, `<=`, `le`, `>`, `gt`, `>=`, `ge`, `==`, `=`, `eq`, `!=`, `<>`, `ne`
### Tester des chemins
<!-- .slide: data-state="small-code" -->
```yaml
- debug:
msg: "path is a directory"
when: mypath is directory
- debug:
msg: "path is a file"
when: mypath is file
- debug:
msg: "path is a symlink"
when: mypath is link
- debug:
msg: "path already exists"
when: mypath is exists
```
Chaque tรขche est effectuรฉe ou abandonnรฉe
en fonction du rรฉsultat du test.
### Tester le rรฉsultat final d'une tรขche
```yaml
- shell: /usr/bin/foo
register: result
ignore_errors: True
- debug:
msg: "it failed"
when: result is failed
- debug:
msg: "it succeeded"
when: result is succeeded
```
## Sortir prรฉmaturรฉment en fonction de conditions
* Le module _fail_ permet de stopper l'exรฉcution d'un playbook si un condition n'est pas remplie.
* Dans l'exemple suivant, l'exรฉcution s'arrรชte car la variable `param2` n'est pas dรฉfinie.
<!-- .slide: data-state="medium-code" -->
```yaml
---
- hosts: ansible-1
vars:
- param1: "test"
tasks:
- name: 'exit if param1 or param2 are null or invalid'
fail: msg="Please enter correct Params"
when: param1 is not defined or param2 is not defined
- debug:
msg: "other tasks..."
```
## Travaux pratiques
<!-- .slide: data-state="nologo-slide" style="text-align: center" -->
![Travaux pratiques](images/tp.gif)
<small>[TP Ansible : templates](travaux-pratiques/tp-ansible-templates.html)</small>

306
Pepiniere/ansible/Formation/8.notions-avancees.md

@ -1,306 +0,0 @@
<!-- .slide: data-state="nologo-slide" style="text-align: center" -->
![Logo Ansible](images/logo-ansible.svg)
# ansible-vault
Sรฉcuriser les donnรฉes sensibles.
* La commande `ansible-vault` permet la crรฉation de conteneurs chiffrรฉs pour les variables sensibles.
```nohighlight
$ ansible-vault create test.yaml
Vault password:
```
* Le choix d'un un mot de passe est obligatoire lors de la crรฉation du fichier.
<!-- .slide: data-state="small-code" -->
Le contenu en clair :
```nohighlight
mon_super_mot_de_passe: 12345678
```
devient aprรจs chiffrement :
```nohighlight
$ cat test.yaml
$ANSIBLE_VAULT;1.1;AES256
62366463643661313763313135376434303535646637653237633233306663623635643761643161
3834383236386535366533303733613838653836623661340a383263633435336234333335343539
30333664666364613731666666636235373633346463353766356364623039656262363238363830
3236656664353565620a303034643732636166376535386436616231653363386334663065326337
3561
```
Le mot de passe sera demandรฉ lors de chacune des exรฉcutions du playbook :
```nohighlight
$ ansible-playbook mon-playbook.yaml โ€“ask-vault-pass
Vault password:
```
### Travaux pratiques
<!-- .slide: data-state="nologo-slide" style="text-align: center" -->
![Travaux pratiques](images/tp.gif)
<small>[TP Ansible vault](travaux-pratiques/tp-ansible-vault.html)</small>
<!-- .slide: data-state="nologo-slide" style="text-align: center" -->
![Logo Ansible](images/logo-ansible.svg)
# Notions avancรฉes
## Surcharge de variables
* Ansible permet la dรฉclaration de variables en de multiples endroits.
* Ansible supporte la surcharge de variables, cette surcharge dรฉpend de lโ€™endroit oรน les variables sont dรฉclarรฉes.
Ordre de prioritรฉ croissant lors de la surcharge :
<small>
* role defaults
* inventory file or script group vars
* inventory group_vars/all
* playbook group_vars/all
* inventory group_vars/*
* playbook group_vars/*
* inventory file or script host vars
* inventory host_vars/*
* playbook host_vars/*
* host facts / cached set_facts
* play vars
* play vars_files
* role vars (defined in role/vars/main.yaml)
* task vars (only for the task)
* include_vars
* set_facts / registered vars
* role (and include_role) params
* include params
* extra vars (always win precedence)
</small>
## register + debug + verbosity
<!-- .slide: data-state="medium-code" -->
```yaml
- shell: /usr/bin/uptime
register: result
- name: Display uptime
debug:
var: result
verbosity: 2 # affichรฉ ร  partir du niveau -vv
- name: Display all variables/facts known for a host
debug:
var: hostvars[inventory_hostname]
verbosity: 4 # affichรฉ ร  partir du niveau -vvvv
```
## Niveau de verbositรฉ
```nohighlight
$ ansible-playbook -i ./hosts playbook.yaml
```
```nohighlight
$ ansible-playbook -vv -i ./hosts playbook.yaml
```
```nohighlight
$ ansible-playbook -vvvv -i ./hosts playbook.yaml
```
## Check mode (ยซ Dry Run ยป)
* Simulation de l'exรฉcution d'un Playbook.
* Aucun changement n'est effectuรฉ sur les hosts lors du check.
* Utiliser lโ€™option `--check`.
* _Attention_ ! Certains modules sont incompatibles avec le Check mode.
Forcer ou non une tรขche en check : `check_mode: yes/no`
<!-- .slide: data-state="small-code" -->
```yaml
tasks:
- name: this task will make changes to the system even in check mode
command: /something/to/run --even-in-check-mode
check_mode: no
- name: this task will always run under checkmode and not change the system
lineinfile:
line: "important config"
dest: /path/to/myconfig.conf
state: present
check_mode: yes
```
## Autres options de ansible-playbook
<!-- .slide: data-state="medium-table" -->
Option | Description
- | -
`--list-hosts` | Affiche les machines concernรฉes par le Play
`--list-tags` | Affiche les tags disponibles
`--list-tasks` | Affiche les tรขches qui seront exรฉcutรฉes
`--step` | Demande confirmation avant l'exรฉcution de chaque tรขche
`--syntax-check` | Analyse syntaxique du Playbook (sans l'exรฉcuter)
## Tester du code Ansible
![Logo Molecule](images/logo-molecule.png) <!-- .element: width="150px" -->
* Permet de tester des Roles Ansible
<small>https://molecule.readthedocs.io/en/latest/</small>
![Logo TestInfra](images/logo-testinfra.svg) <!-- .element: width="150px" -->
Crรฉation de tests unitaire en langage Python
<!-- .slide: data-state="small-table" -->
```python
def test_passwd_file(host):
passwd = host.file("/etc/passwd")
assert passwd.contains("root")
assert passwd.user == "root"
assert passwd.group == "root"
assert passwd.mode == 0o644
```
Combinรฉ avec GitLab-CI/Jenkins et Docker, il permet d'automatiser le test de code Ansible.
<small>https://testinfra.readthedocs.io/en/latest/</small>
## Ansible Lint
* Permet de dรฉtecter les comportements et les pratiques qui peuvent รชtre amรฉliorรฉs.
<small>https://ansible-lint.readthedocs.io/en/latest/</small>
## Ansible en mode Pull
* Ansible fonctionne traditionnellement en mode `Push`.
* Il est possible de passer en mode `Pull` ร  l'aide de la commande `ansible-pull`.
* Intรฉrรชt du mode Pull
- Adresser un grand nombre de machines,
- Remediation des systรจmes en continu.
* Prรฉ-requis du mode Pull
* Playbooks disponibles sur un dรฉpรดt git,
* Ansible installรฉ sur chaque machine cible.
<small>https://docs.ansible.com/ansible/latest/cli/ansible-pull.html</small>
<small>https://github.com/ansible/ansible-examples/blob/master/language_features/ansible_pull.yaml</small>
## Dรฉvelopper un module personnalisรฉ
`./library/mymodule.py`
```python
#!/usr/bin/python
from ansible.module_utils.basic import *
def main():
module = AnsibleModule(argument_spec={})
response = {"hello": "world"}
module.exit_json(changed=False, meta=response)
if __name__ == '__main__':
main()
```
<small>https://blog.toast38coza.me/custom-ansible-module-hello-world/</small>
<small>https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general.html</small>
## Utiliser un module personnalisรฉ
<!-- .slide: data-state="small-code" -->
`playbook-demo-mymodule.yaml`
```yaml
- hosts: web
tasks:
- name: Test that my module works
mymodule:
register: result
- debug: var=result
```
```nohighlight
$ ansible-playbook -i ./hosts playbook-demo-mymodule.yaml
...
TASK [Test that my module works] ***********************************************
ok: [web2.formation.sii.fr]
ok: [web1.formation.sii.fr]
TASK [debug] *******************************************************************
ok: [web1.formation.sii.fr] => {
"result": { "changed": false, "meta": { "hello": "world" } }
}
ok: [web2.formation.sii.fr] => {
"result": { "changed": false, "meta": { "hello": "world" } }
}
...
```
## Ansible Tower
* Interface Web propriรฉtaire pour le lancement de playbooks.
* Accรจs ร  lโ€™historique des playbooks lancรฉs et aux logs d'exรฉcution.
* Gestion des utilisateurs et de l'inventaire.
* Pilotable via API.
<small>https://www.ansible.com/products/tower</small>
### Tableau de bord d'Ansible Tower
![Tower dashboard](images/tower-dashboard.png)
### AWX
* Version opensource de Ansible Tower (sous licence Apache 2.0.)
* AWX est ร  Ansible Tower ce que Fedora est ร  Red Hat Enterprise Linux.
* Non recommandรฉ pour les environnements de production.
* Aucun support n'est fourni par Red Hat.
<small>https://www.ansible.com/products/awx-project</small>

246
Pepiniere/ansible/Formation/9.Ansible-Galaxy.md

@ -1,246 +0,0 @@
<!-- .slide: data-state="nologo-slide" style="text-align: center" -->
![Logo Ansible](images/logo-ansible.svg)
# Ansible Galaxy
Crรฉer et partager ses propres roles.
## Ansible Galaxy
* Communautรฉ pour trouver, tรฉlรฉcharger, partager des rรดles.
* Site : [https://galaxy.ansible.com/](https://galaxy.ansible.com/)
* CLI : `ansible-galaxy`
* Doc : [http://docs.ansible.com/ansible/galaxy.html](http://docs.ansible.com/ansible/galaxy.html)
## Une communautรฉ
* Tรฉlรฉcharger des roles depuis Galaxy est un bon moyen pour dรฉmarrer un projet.
* On ne rรฉinvente pas la roue.
* Enormรฉment de projets : environ 19'500 roles (jan. 2019).
## Mais soyez vigilent
* Tout le monde peut partager.
* Beaucoup de duplications.
* Vulnรฉrabilitรฉs, malveillance, dangereux, mauvais fonctionnement...
![](images/ansible-galaxy-site.png) <!-- .element: width="2000px" -->
## Rechercher des rรดles
<!-- .slide: data-state="small-code" -->
```none
$ ansible-galaxy search httpd
Found 182 roles matching your search:
Name Description
---- -----------
2kloc.trellis-monit Install and configure Monit service in Trellis.
acropia.httpd IT Professional
ahuffman.sat6_create_hosts An Ansible role to create new virtual and ba...
AlbanAndrieu.ansible-workstation A role for installing workstation
AnatolyRugalev.ansistrano-deploy Ansible role to deploy scripting application...
ansiblebit.httpd Ansible role to setup the Apache HTTP server.
ansiblebit.mod_wsgi Ansible role to install and setup mod_wsgi.
ansible-ThoTeam.nexus3-oss Nexus Repository Manager 3.x (Sonatype)
ansistrano.deploy Ansible role to deploy scripting application...
ansistrano.rollback Ansible role to rollback scripting applicati...
Anthony25.squid Installs Squid
archf.packages Ansible role to install packages on a host
awasilyev.apache-container Ansible Container role that adds an apache s...
awasilyev.drupal-container Ansible Container role that adds an apache s...
awasilyev.tomcat-container Ansible Container role that adds an tomcat s...
axmac.axmac_apache Apache2
beardyjay.firewalld Base role for firewalld
...
```
## Tรฉlรฉcharger un rรดle
* https://galaxy.ansible.com/geerlingguy/apache
<!-- .slide: data-state="small-code" -->
```none
$ ansible-galaxy install geerlingguy.apache
- downloading role 'apache', owned by geerlingguy
- downloading role from https://github.com/geerlingguy/ansible-role/.../3.0.3.tar.gz
- extracting geerlingguy.apache to /home/ansible/.ansible/roles/geerlingguy.apache
- geerlingguy.apache (3.0.3) was installed successfully
```
## Fichiers rรฉcupรฉrรฉs
<!-- .slide: data-state="small-code" -->
```none
/home/ansible/.ansible
โ””โ”€โ”€ roles
ย ย  โ””โ”€โ”€ geerlingguy.apache
ย ย  โ”œโ”€โ”€ defaults
ย ย  โ”‚ย ย  โ””โ”€โ”€ main.yaml
ย ย  โ”œโ”€โ”€ handlers
ย ย  โ”‚ย ย  โ””โ”€โ”€ main.yaml
ย ย  โ”œโ”€โ”€ LICENSE
ย ย  โ”œโ”€โ”€ meta
ย ย  โ”‚ย ย  โ””โ”€โ”€ main.yaml
ย ย  โ”œโ”€โ”€ README.md
ย ย  โ”œโ”€โ”€ tasks
ย ย  โ”‚ย ย  โ”œโ”€โ”€ configure-Debian.yaml
ย ย  โ”‚ย ย  โ”œโ”€โ”€ configure-RedHat.yaml
ย ย  โ”‚ย ย  โ”œโ”€โ”€ configure-Suse.yaml
ย ย  โ”‚ย ย  โ”œโ”€โ”€ main.yaml
ย ย  โ”‚ย ย  โ”œโ”€โ”€ setup-Debian.yaml
ย ย  โ”‚ย ย  โ”œโ”€โ”€ setup-RedHat.yaml
ย ย  โ”‚ย ย  โ””โ”€โ”€ setup-Suse.yaml
ย ย  โ”œโ”€โ”€ templates
ย ย  โ”‚ย ย  โ””โ”€โ”€ vhosts.conf.j2
ย ย  โ””โ”€โ”€ vars
ย ย  โ”œโ”€โ”€ apache-22.yaml
ย ย  โ”œโ”€โ”€ apache-24.yaml
ย ย  โ”œโ”€โ”€ Debian.yaml
ย ย  โ”œโ”€โ”€ RedHat.yaml
ย ย  โ””โ”€โ”€ Suse.yaml
```
## Pourquoi utiliser Galaxy ?
* Crรฉer des roles Ansible rรฉutilisables est une bonne pratique.
* Partager des roles sur son propre SCM.
* Apporter une notion de dรฉpendances ร  la sauce Maven ou NPM.
## Fonctionnement avancรฉ
* Installer plusieurs roles en une seule fois.
* Rรฉcupรฉrer des roles depuis plusieurs sources (Galaxy, Git, filer...).
* Un seul fichier dรฉcrivant la liste des roles ร  installer : `requirements.yaml`
```none
$ ansible-galaxy install -r requirements.yaml
```
## Plusieurs sources possibles
Depuis Galaxy
<!-- .slide: data-state="medium-code" -->
```yaml
- src: zaxos.tomcat-ansible-role
- src: user.rolename
...
```
Avec l'utilisation de Galaxy, l'attribut `src` reprรฉsente simplement `<nom du contributeur>`.`<nom du role>`
Depuis un serveur Git
<!-- .slide: data-state="medium-code" -->
```yaml
- src: git@gitlab.sii-ouest.fr:ouest/projects/ansible/tomcat.git
scm: git
version: develop
```
L'attribut `version` peut รชtre un tag, un nom de branche ou un numรฉro de commit. La version par dรฉfaut est master.
Depuis GitHub, pas besoin d'indiquer de SCM
Depuis un serveur web
<!-- .slide: data-state="medium-code" -->
```yaml
- src: https://url.du.serveur.com/ansible/roles/tomcat.tar.gz
name: tomcat-role
```
L'attribut `name` sert ร  indiquer le nom du role lorsqu'il est tรฉlรฉchargรฉ
## Dรฉfinir le chemin de tรฉlรฉchargement
<!-- .slide: data-state="medium-code" -->
Par dรฉfaut, les roles sont tรฉlรฉchargรฉs ร  l'endroit spรฉcifiรฉ par la variable d'environnement `ANSIBLE_ROLE_PATH`.
Il est possible de dรฉfinir le chemin directement en ligne de commande.
```none
$ ansible-galaxy install -r requirements.yaml -p|-roles-path .
```
## Crรฉer des roles Ansible
Il est trรจs facile de crรฉer un role Ansible avec une structure de dossier prรฉ-dรฉfinit avec la commande `init`.
```none
$ ansible-galaxy init tomcat-custom
```
</br>
L'argument `-force` permet d'รฉcraser un role existant portant le mรชme nom.
La crรฉation du role gรฉnรจre la structure ci-dessous :
```none
/tomcat-custom
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ .travis.yaml
โ”œโ”€โ”€ defaults/
| โ””โ”€โ”€ main.yaml
โ”œโ”€โ”€ files/
โ”œโ”€โ”€ handlers/
| โ””โ”€โ”€ main.yaml
โ”œโ”€โ”€ meta/
| โ””โ”€โ”€ main.yaml
โ”œโ”€โ”€ templates/
โ”œโ”€โ”€ tests/
| โ”œโ”€โ”€ inventory
| โ””โ”€โ”€ test.yaml
โ””โ”€โ”€ vars/
โ””โ”€โ”€main.yaml
```
## Utiliser une structure personalisรฉe
<!-- .slide: data-state="medium-code" -->
```none
$ ansible-galaxy init --role-skeleton=/chemin/squelette tomcat-custom
```
Quand une structure personalisรฉe est utilisรฉe, les points suivants sont respectรฉs :
* Copie tous les fichiers et dossiers vers le nouveau role.
* Les dossiers `.git` et fichiers `.git_keep` ne sont pas recopiรฉs.
* Le fichier `meta/main.yaml` est obligatoire pour rรฉcupรฉrer le role via Galaxy.
### Travaux pratiques
<!-- .slide: data-state="nologo-slide" style="text-align: center" -->
![Travaux pratiques](images/tp.gif)
<small>[TP Ansible Galaxy](travaux-pratiques/tp-ansible-galaxy.html)</small>

29
Pepiniere/ansible/Formation/README.md

@ -1,29 +0,0 @@
# Formation Ansible
## Programme
1. Introduction ansible
2. Installation / Inventaire
3. Commandes ad-hoc
4. Playbooks
5. Roles
6. Structures de contrรดle
7. Templates
8. Notions avancรฉes
## Slides
Pour rรฉcupรฉrer les slides :
`git clone --recurse-submodules https://gitlab.siinergy.net/sii-ouest/trainings/ansible.git`
Version [pdf](https://gitlab.siinergy.net/sii-ouest/trainings/ansible/-/jobs/artifacts/2019-03-06/raw/ansible.pdf?job=make-pdf)
## Machines vituelles
Voir [ansible-config-virtualbox-vms.md](ansible-config-virtualbox-vms.md).
## Todo
Les amรฉliorations ร  apporter ร  la formation : [https://gitlab.siinergy.net/sii-ouest/trainings/ansible/boards](https://gitlab.siinergy.net/sii-ouest/trainings/ansible/boards)

54
Pepiniere/ansible/Formation/ansible-config-virtualbox-vms.md

@ -1,54 +0,0 @@
# Machines virtuelles VirtualBox pour la formation Ansible
## Prรฉ-requis de l'hรดte
- 8 Go de RAM au minimum
- Processeur Intel Corei__X__
## Machines virtuelles
Un fichier _.ova_ contenant deux machines virtuelles prรชtes ร  l'emploi est disponible sur le filer.
Mot de passe de l'utilisateur `ansible` : `ansible`.
Mot de passe de l'utilisateur `root` : `ansible`.
VM | description
- | -
ansible-0 | Machine ansible maรฎtre avec OS Debian 9 et ansible 2.6 installรฉ
ansible-1 | Machine de test avec OS Centos 7
ansible-2 | Machine de test avec OS Centos 7
ansible-3 | Machine de test avec OS Debian 9
### Configuration des ressources
- 1024 Mo RAM par VM
- 1 CPU par VM
### Configuration rรฉseau
Chaque VM a 2 interfaces rรฉseaux :
- Interface 1 : __NAT__
Lโ€™accรจs Internet de la machine hรดte est alors partagรฉ, on peut faire des mises ร  jour etc. La machine virtuelle voit Internet mais nโ€™est pas vue du rรฉseau local (elle est derriรจre un NAT qui est gรฉrรฉ par VirtualBox).
- Interface 2 : __Rรฉseau privรฉ hรดte avec DHCP__
La machine est visible et voit la machine hรดte et rรฉciproquement. Cette interface rรฉseau sert pour se connecter en SSH depuis la machine hรดte sur la machine virtuelle. Elle permet รฉgalement aux diffรฉrentes machines virtuelles positionnรฉes sur ce rรฉseau de communiquer entre elles.
Le type des cartes est __Intel PRO/1000 MT Desktop (82540EM)__.
Qui voit quoi ?
- Via la carte en __NAT__
* la VM a accรจs ร  Internet pour les mises ร  jour derriรจre un NAT.
* La VM est invisible du rรฉseau local et de la machine hรดte (ร  moins de faire des redirections de port).
- Via la carte __Rรฉseau privรฉ hรดte__
* la VM a accรจs ร  la machine hรดte et rรฉciproquement.
* la VM est visible des autres machines virtuelles situรฉes dans le mรชme rรฉseau privรฉ hรดte.
En rรฉsumรฉ, les deux machines virtuelles pourront donc communiquer entre elles via l'interface _Rรฉseau privรฉ hรดte_ et accรฉder ร  internet via l'interface _NAT_.
Si besoin que toutes les VMs des stagiaires se voient entre elles il est possible de remplacer la carte __NAT__ par une carte __Bridge__.

BIN
Pepiniere/ansible/Formation/images/ansible-ad-hoc-deployment-workflow.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

BIN
Pepiniere/ansible/Formation/images/ansible-ad-hoc-multi-node-deployment.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 KiB

BIN
Pepiniere/ansible/Formation/images/ansible-archi-playbooks.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

BIN
Pepiniere/ansible/Formation/images/ansible-archi-roles.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

BIN
Pepiniere/ansible/Formation/images/ansible-archi-ssh.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

BIN
Pepiniere/ansible/Formation/images/ansible-galaxy-site.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 153 KiB

BIN
Pepiniere/ansible/Formation/images/ansible-playbook-deployment-workflow.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

BIN
Pepiniere/ansible/Formation/images/ansible-playbook-multi-node-deployment-workflow.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 KiB

BIN
Pepiniere/ansible/Formation/images/ci-vs-cd-devops-difference.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 135 KiB

70
Pepiniere/ansible/Formation/images/logo-ansible.svg

@ -1,70 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="255.13245"
height="255.13094"
viewBox="0 0 255.13245 255.13094"
version="1.1"
preserveAspectRatio="xMidYMid"
id="svg925"
sodipodi:docname="logo-ansible.svg"
inkscape:version="0.92.3 (2405546, 2018-03-11)">
<metadata
id="metadata931">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs929" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1104"
inkscape:window-height="740"
id="namedview927"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:zoom="0.74920635"
inkscape:cx="127.25387"
inkscape:cy="97.93274"
inkscape:window-x="2675"
inkscape:window-y="167"
inkscape:window-maximized="0"
inkscape:current-layer="svg925" />
<g
id="g921"
transform="translate(-0.74612733,-0.30180854)">
<path
style="fill:#1a1918"
inkscape:connector-curvature="0"
id="path917"
d="m 255.87857,127.86803 c 0,70.45514 -57.11008,127.56471 -127.56622,127.56471 -70.450124,0 -127.56622267,-57.10957 -127.56622267,-127.56471 0,-70.450122 57.11609867,-127.56622146 127.56622267,-127.56622146 70.45614,0 127.56622,57.11609946 127.56622,127.56622146" />
<path
style="fill:#ffffff"
inkscape:connector-curvature="0"
id="path919"
d="m 130.45986,78.228885 33.0116,81.476255 -49.86345,-39.2778 z M 189.10434,178.47412 138.32577,56.27205 c -1.44952,-3.524365 -4.34807,-5.389259 -7.86591,-5.389259 -3.52436,0 -6.63386,1.864894 -8.08338,5.389259 L 66.643604,190.31241 h 19.06532 l 22.062306,-55.26527 65.83887,53.18993 c 2.64792,2.14114 4.55852,3.1095 7.0422,3.1095 4.97389,0 9.32146,-3.72879 9.32146,-9.11102 0,-0.87594 -0.3094,-2.2662 -0.86942,-3.76143 z" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.6 KiB

BIN
Pepiniere/ansible/Formation/images/logo-molecule.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

240
Pepiniere/ansible/Formation/images/logo-testinfra.svg

@ -1,240 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="69.332382mm"
height="73.924599mm"
viewBox="0 0 69.332382 73.924598"
version="1.1"
id="svg8"
inkscape:version="0.92.1 r15371"
sodipodi:docname="logo.svg">
<defs
id="defs2" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="2.2198742"
inkscape:cx="152.60272"
inkscape:cy="114.33618"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="true"
showguides="true"
inkscape:guide-bbox="true"
inkscape:window-width="1238"
inkscape:window-height="1149"
inkscape:window-x="678"
inkscape:window-y="24"
inkscape:window-maximized="0"
fit-margin-top="5"
fit-margin-left="5"
fit-margin-right="5"
fit-margin-bottom="5">
<sodipodi:guide
position="34.492814,79.507924"
orientation="1,0"
id="guide131"
inkscape:locked="false" />
<sodipodi:guide
position="37.138654,79.507924"
orientation="1,0"
id="guide133"
inkscape:locked="false" />
<inkscape:grid
type="xygrid"
id="grid135"
originx="-75.309266"
originy="-204.91915" />
<sodipodi:guide
position="31.846984,66.278763"
orientation="-0.70710678,0.70710678"
id="guide137"
inkscape:locked="false" />
<sodipodi:guide
position="46.399065,59.664183"
orientation="0.70710678,0.70710678"
id="guide139"
inkscape:locked="false" />
<sodipodi:guide
position="23.909484,68.924593"
orientation="1,0"
id="guide141"
inkscape:locked="false" />
<sodipodi:guide
position="47.721985,68.924593"
orientation="1,0"
id="guide143"
inkscape:locked="false" />
<sodipodi:guide
position="49.044895,62.310013"
orientation="1,0"
id="guide145"
inkscape:locked="false" />
<sodipodi:guide
position="22.586565,59.664183"
orientation="1,0"
id="guide147"
inkscape:locked="false" />
<sodipodi:guide
position="18.617815,47.757932"
orientation="-0.70710678,0.70710678"
id="guide149"
inkscape:locked="false" />
<sodipodi:guide
position="53.013645,47.757932"
orientation="0.70710678,0.70710678"
id="guide151"
inkscape:locked="false" />
<sodipodi:guide
position="60.951144,25.268352"
orientation="0.70710678,0.70710678"
id="guide153"
inkscape:locked="false" />
<sodipodi:guide
position="0.79573003,80.992434"
orientation="1,0"
id="guide155"
inkscape:locked="false" />
<sodipodi:guide
position="35.815734,49.080852"
orientation="-0.70710678,0.70710678"
id="guide159"
inkscape:locked="false" />
<sodipodi:guide
position="35.815724,49.080852"
orientation="0.70710678,0.70710678"
id="guide161"
inkscape:locked="false" />
<sodipodi:guide
position="35.815734,22.622512"
orientation="0,1"
id="guide163"
inkscape:locked="false" />
<sodipodi:guide
position="35.815734,31.882933"
orientation="0.70710678,0.70710678"
id="guide165"
inkscape:locked="false" />
<sodipodi:guide
position="35.815734,31.882943"
orientation="-0.70710678,0.70710678"
id="guide167"
inkscape:locked="false" />
<sodipodi:guide
position="35.815714,31.882933"
orientation="0,1"
id="guide169"
inkscape:locked="false" />
<sodipodi:guide
position="35.815734,34.528763"
orientation="0.70710678,0.70710678"
id="guide171"
inkscape:locked="false" />
<sodipodi:guide
position="35.815734,34.528763"
orientation="-0.70710678,0.70710678"
id="guide173"
inkscape:locked="false" />
<sodipodi:guide
position="9.3573983,37.174603"
orientation="1,0"
id="guide179"
inkscape:locked="false" />
<sodipodi:guide
position="62.274065,49.080852"
orientation="1,0"
id="guide181"
inkscape:locked="false" />
</sodipodi:namedview>
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-75.309265,-18.156247)">
<path
style="fill:#c8d129;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 109.80208,23.156247 99.218749,33.739579 V 69.458334 L 109.80209,58.875001 Z"
id="path175"
inkscape:connector-curvature="0" />
<path
style="fill:#d57b28;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 112.44792,23.156247 10.58333,10.583335 V 69.458334 L 112.44792,58.875001 Z"
id="path177"
inkscape:connector-curvature="0" />
<path
style="fill:#009de0;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 97.895829,54.377079 V 39.824995 L 84.666663,53.054162 v 14.552083 z"
id="path183"
inkscape:connector-curvature="0" />
<path
style="fill:#68696b;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 84.666666,69.458334 9.260416,-9.260417 h 5.291667 v 9.260417 z"
id="path185"
inkscape:connector-curvature="0" />
<path
style="fill:#68696b;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 101.86457,69.458334 9.26043,-9.260425 9.26042,9.260419 z"
id="path187"
inkscape:connector-curvature="0" />
<path
style="fill:#68696b;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 137.58333,69.458334 -9.26041,-9.260417 h -5.29167 v 9.260417 z"
id="path189"
inkscape:connector-curvature="0" />
<path
style="fill:#bf2b1b;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 124.35417,54.112492 V 39.560411 l 13.22916,13.229167 v 14.552083 z"
id="path191"
inkscape:connector-curvature="0" />
<g
id="g1029"
transform="translate(-1.2138998,-11.055804)">
<text
id="text1000"
y="97.953201"
x="81.170387"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14.11111069px;line-height:6.61458302px;font-family:'Baekmuk Headline';-inkscape-font-specification:'Baekmuk Headline, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#868789;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14.11111069px;font-family:'Baekmuk Headline';-inkscape-font-specification:'Baekmuk Headline, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#868789;fill-opacity:1;stroke-width:0.26458332px"
y="97.953201"
x="81.170387"
id="tspan998"
sodipodi:role="line">test</tspan></text>
<text
id="text1023"
y="97.995537"
x="110.84151"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14.11111069px;line-height:6.61458302px;font-family:'Baekmuk Headline';-inkscape-font-specification:'Baekmuk Headline, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#009de0;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14.11111069px;font-family:'Baekmuk Headline';-inkscape-font-specification:'Baekmuk Headline, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#009de0;fill-opacity:1;stroke-width:0.26458332px"
y="97.995537"
x="110.84151"
id="tspan1021"
sodipodi:role="line">infra</tspan></text>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 9.7 KiB

BIN
Pepiniere/ansible/Formation/images/manual-deployment-without-ansible.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

BIN
Pepiniere/ansible/Formation/images/tower-dashboard.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 KiB

BIN
Pepiniere/ansible/Formation/images/tp.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 KiB

150
Pepiniere/ansible/Formation/index.html

@ -1,150 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>SII - Ansible</title>
<link rel="icon" type="image/png" href="revealjs/images/favicon-logo-sii.png" />
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="revealjs/css/reset.css">
<link rel="stylesheet" href="revealjs/css/reveal.css">
<link rel="stylesheet" href="revealjs/css/theme/sii.css"> <!-- SII theme -->
<!-- Theme used for syntax highlighting of code -->
<link rel="stylesheet" href="revealjs/lib/css/monokai.css">
<!-- Specific CSS override to reduce font size and align text on the left -->
<style>
.reveal .slides {
text-align: left;
}
.columns {
display: flex;
}
.columns pre {
margin-right: 0.5rem;
}
</style>
<!-- Printing and PDF exports -->
<script>
var link = document.createElement( 'link' );
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match( /print-pdf/gi ) ? 'revealjs/css/print/pdf.css' : 'revealjs/css/print/paper.css';
document.getElementsByTagName( 'head' )[0].appendChild( link );
</script>
<!--[if lt IE 9]>
<script src="lib/js/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<div class="reveal">
<div class="slides">
<section data-markdown="1.Introduction-ansible.md"
data-separator="^\n\n\n"
data-separator-vertical="^\n\n"
data-separator-notes="^Note:"
data-charset="UTF-8">
</section>
<section data-markdown="2.installation-inventaire.md"
data-separator="^\n\n\n"
data-separator-vertical="^\n\n"
data-separator-notes="^Note:"
data-charset="UTF-8">
</section>
<section data-markdown="3.commandes-ad-hoc.md"
data-separator="^\n\n\n"
data-separator-vertical="^\n\n"
data-separator-notes="^Note:"
data-charset="UTF-8">
</section>
<section data-markdown="4.playbooks.md"
data-separator="^\n\n\n"
data-separator-vertical="^\n\n"
data-separator-notes="^Note:"
data-charset="UTF-8">
</section>
<section data-markdown="5.roles.md"
data-separator="^\n\n\n"
data-separator-vertical="^\n\n"
data-separator-notes="^Note:"
data-charset="UTF-8">
</section>
<section data-markdown="6.structures-de-controle.md"
data-separator="^\n\n\n"
data-separator-vertical="^\n\n"
data-separator-notes="^Note:"
data-charset="UTF-8">
</section>
<section data-markdown="7.templates.md"
data-separator="^\n\n\n"
data-separator-vertical="^\n\n"
data-separator-notes="^Note:"
data-charset="UTF-8">
</section>
<section data-markdown="8.notions-avancees.md"
data-separator="^\n\n\n"
data-separator-vertical="^\n\n"
data-separator-notes="^Note:"
data-charset="UTF-8">
</section>
<section data-markdown="9.Ansible-Galaxy.md"
data-separator="^\n\n\n"
data-separator-vertical="^\n\n"
data-separator-notes="^Note:"
data-charset="UTF-8">
</section>
<section data-markdown="10.bonnes-pratiques.md"
data-separator="^\n\n\n"
data-separator-vertical="^\n\n"
data-separator-notes="^Note:"
data-charset="UTF-8">
</section>
</div>
</div>
<script src="revealjs/js/reveal.js"></script>
<script>
// More info https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
controls: true,
progress: true,
center: true,
hash: true,
transition: 'slide', // none/fade/slide/convex/concave/zoom
// More info https://github.com/hakimel/reveal.js#dependencies
dependencies: [
{ src: 'revealjs/plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'revealjs/plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'revealjs/plugin/highlight/highlight.js', async: true },
{ src: 'revealjs/plugin/search/search.js', async: true },
{ src: 'revealjs/plugin/zoom-js/zoom.js', async: true },
{ src: 'revealjs/plugin/notes/notes.js', async: true }
]
});
Reveal.configure({
slideNumber: 'c/t'
});
</script>
<img class="logo" src="revealjs/images/logo-sii.svg" />
<p class="footer">SII โ€ข www.groupe-sii.com โ€ข fรฉvrier 2019</p>
</body>
</html>

72
Pepiniere/ansible/Formation/introduction.html

@ -1,72 +0,0 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>SII - Formation Ansible</title>
<link rel="icon" type="image/png" href="revealjs/images/favicon-logo-sii.png" />
<link rel="stylesheet" href="revealjs/css/reveal.css">
<link rel="stylesheet" href="revealjs/css/theme/sii.css"> <!-- SII theme -->
<link rel="stylesheet" href="revealjs/css/custom.css"> <!-- your custom styles -->
<!-- Theme used for syntax highlighting of code -->
<link rel="stylesheet" href="revealjs/lib/css/zenburn.css">
<!-- Printing and PDF exports -->
<script>
var link = document.createElement( 'link' );
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match( /print-pdf/gi ) ? 'revealjs/css/print/pdf.css' : 'revealjs/css/print/paper.css';
document.getElementsByTagName( 'head' )[0].appendChild( link );
</script>
</head>
<body>
<div class="reveal">
<div class="slides">
<section data-markdown="0.Introduction-formation.md"
data-separator="^\n\n\n"
data-separator-vertical="^\n\n"
data-separator-notes="^Note:"
data-charset="UTF-8">
</section>
</div>
</div>
<script src="revealjs/lib/js/head.min.js"></script>
<script src="revealjs/js/reveal.js"></script>
<script>
// More info https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
history: true,
// Transition style
transition: 'slide', // none/fade/slide/convex/concave/zoom
// Transition style for full page slide backgrounds
backgroundTransition: 'none', // none/fade/slide/convex/concave/zoom
// More info https://github.com/hakimel/reveal.js#dependencies
dependencies: [
{ src: 'revealjs/plugin/markdown/marked.js' },
{ src: 'revealjs/plugin/markdown/markdown.js' },
{ src: 'revealjs/plugin/notes/notes.js', async: true },
{ src: 'revealjs/plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } }
]
});
// Slide number formatting can be configured using these variables:
// "h.v": horizontal . vertical slide number (default)
// "h/v": horizontal / vertical slide number
// "c": flattened slide number
// "c/t": flattened slide number / total slides
Reveal.configure({ slideNumber: 'c/t' });
Reveal.configure({ transition: 'none' });
</script>
<img class="logo" src="revealjs/images/logo-sii.svg" />
<p class="footer">SII โ€ข www.groupe-sii.com โ€ข fรฉvrier 2019</p>
</body>
</html>

13
Pepiniere/ansible/Formation/revealjs/README.md

@ -1,13 +0,0 @@
# template-revealjs-sii-theme
Template SII pour diaporama [reveal.js](http://lab.hakim.se/reveal-js/).
Ce thรจme est actuellement utilisรฉ pour les slides des formations Ansible, Docker, Kubernetes et OpenStack.
Le thรจme propose :
- un habillage respecteux de la charte graphique SII,
- quelques [fonctionnalitรฉs utiles](content.md) (comme la gestion de taille des portions de code ou des tableaux).
Enjoy!

239
Pepiniere/ansible/Formation/revealjs/content.md

@ -1,239 +0,0 @@
# Titre
__Sous-titre__
## Enchaรฎnements
* Avec 2 lignes d'espacement, les diapo dรฉfilent __vers le bas__
* Avec 3 lignes d'espacement, les diapo dรฉfilent __vers la droite__
## Formatage
### Styles
\_\_gras\_\_ : __gras__
\_emphase\_ : _emphase_
\`code\` : `code`
### Puces
* rouge
* vert
* bleu
* bleu marine
* bleu ciel
* noir
## Images
* On peut prรฉciser la _taille des images_ avec
`<!-- .element: height="200px" -->`
![Logo SII](images/logo-sii.png) <!-- .element: height="200px" -->
![Logo SII](images/logo-sii.png) <!-- .element: height="100px" -->
## Liens
\[Nom de la ressource\](Url de la ressource)
\[GitHub SII\](https://github.com/groupe-sii)
## Code
Taille normale
```javascript
function toggle(elemID){
var elem = document.getElementById(elemID);
if (elem.style.display === 'block') {
elem.style.display = 'none';
}
else {
elem.style.display = 'block';
}
}
```
Taille moyenne
`<!-- .slide: data-state="medium-code" -->`
<!-- .slide: data-state="medium-code" -->
```javascript
function toggle(elemID){
var elem = document.getElementById(elemID);
if (elem.style.display === 'block') {
elem.style.display = 'none';
}
else {
elem.style.display = 'block';
}
}
```
Petite taille
`<!-- .slide: data-state="small-code" -->`
<!-- .slide: data-state="small-code" -->
```javascript
function toggle(elemID){
var elem = document.getElementById(elemID);
if (elem.style.display === 'block') {
elem.style.display = 'none';
}
else {
elem.style.display = 'block';
}
}
```
## Tableaux
Taille normale
| Colonne 1 | Colonne 2 | Colonne 3 |
| - | - | - |
| A1 | B1 | C1 |
| A2 | B2 | C2 |
Taille moyenne
`<!-- .slide: data-state="medium-table" -->`
<!-- .slide: data-state="medium-table" -->
| Colonne 1 | Colonne 2 | Colonne 3 |
| - | - | - |
| A1 | B1 | C1 |
| A2 | B2 | C2 |
Petite taille
`<!-- .slide: data-state="small-table" -->`
<!-- .slide: data-state="small-table" -->
| Colonne 1 | Colonne 2 | Colonne 3 |
| - | - | - |
| A1 | B1 | C1 |
| A2 | B2 | C2 |
## Fonctionnalitรฉs avancรฉes
### Utilisation de balises HTML dans le Markdown
- La formule Chimique de l'eau est H<sub>2</sub>O.
- E=mc<sup>2</sup> !
- Voici du texte en <small>fonte rรฉduite</small>. Cool non ?
<!-- .slide: data-state="small-code" -->
```
- La formule Chimique de l'eau est H<sub>2</sub>O.
- E=mc<sup>2</sup> !
- Voici du texte en <small>fonte rรฉduite</small>. Cool non ?
```
### Background
<!-- .slide: data-background-color="#888888" -->
Modifier le background des slides :
`<!-- .slide: data-background-image="http://example.com/image.png" -->`
`<!-- .slide: data-background-repeat="repeat" -->`
`<!-- .slide: data-background-size="100px" -->`
`<!-- .slide: data-background-color="#888888" -->`
### Transitions
<!-- .slide: data-transition="concave" -->
Changer le type de transition :
* default
* cube
* page
* concave
* zoom
* linear
* fade
* none
`<!-- .slide: data-transition="concave" -->`
### Vitesse de transition
<!-- .slide: data-transition="concave" data-transition-speed="slow" -->
Changer la vitesse de la transition :
* default
* fast
* slow
`<!-- .slide: data-transition-speed="slow" -->`
### data-state
<!-- .slide: data-state="data-state-slide" -->
L'ajout de `data-state` sur une slide permet d'appliquer une *classe CSS* spรฉcifique ร  une slide.
`<!-- .slide: data-state="data-state-slide" -->`
```css
.data-state-slide em {
color: #951753 !important;
}
```
### Cheat-Sheet
<!-- .slide: data-state="cheat-sheet" -->
1. On peut afficher une liste ordonnรฉe faรงon Cheat-Sheet
`<!-- .slide: data-state="cheat-sheet" -->`
2. Afficher une vache
`$ apt moo`
3. Faire beugler une vache
`$ echo "Meuhhhh" | cowsay`
### Masquer le logo
<!-- .slide: data-state="nologo-slide" -->
`<!-- .slide: data-state="nologo-slide" -->`

5
Pepiniere/ansible/Formation/revealjs/css/custom.css

@ -1,5 +0,0 @@
/* customization sample */
.data-state-slide em {
color: #951753 !important;
}

202
Pepiniere/ansible/Formation/revealjs/css/print/paper.css

@ -1,202 +0,0 @@
/* Default Print Stylesheet Template
by Rob Glazebrook of CSSnewbie.com
Last Updated: June 4, 2008
Feel free (nay, compelled) to edit, append, and
manipulate this file as you see fit. */
@media print {
/* SECTION 1: Set default width, margin, float, and
background. This prevents elements from extending
beyond the edge of the printed page, and prevents
unnecessary background images from printing */
html {
background: #fff;
width: auto;
height: auto;
overflow: visible;
}
body {
background: #fff;
font-size: 20pt;
width: auto;
height: auto;
border: 0;
margin: 0 5%;
padding: 0;
overflow: visible;
float: none !important;
}
/* SECTION 2: Remove any elements not needed in print.
This would include navigation, ads, sidebars, etc. */
.nestedarrow,
.controls,
.fork-reveal,
.share-reveal,
.state-background,
.reveal .progress,
.reveal .backgrounds {
display: none !important;
}
/* SECTION 3: Set body font face, size, and color.
Consider using a serif font for readability. */
body, p, td, li, div {
font-size: 20pt!important;
font-family: Georgia, "Times New Roman", Times, serif !important;
color: #000;
}
/* SECTION 4: Set heading font face, sizes, and color.
Differentiate your headings from your body text.
Perhaps use a large sans-serif for distinction. */
h1,h2,h3,h4,h5,h6 {
color: #000!important;
height: auto;
line-height: normal;
font-family: Georgia, "Times New Roman", Times, serif !important;
text-shadow: 0 0 0 #000 !important;
text-align: left;
letter-spacing: normal;
}
/* Need to reduce the size of the fonts for printing */
h1 { font-size: 28pt !important; }
h2 { font-size: 24pt !important; }
h3 { font-size: 22pt !important; }
h4 { font-size: 22pt !important; font-variant: small-caps; }
h5 { font-size: 21pt !important; }
h6 { font-size: 20pt !important; font-style: italic; }
/* SECTION 5: Make hyperlinks more usable.
Ensure links are underlined, and consider appending
the URL to the end of the link for usability. */
a:link,
a:visited {
color: #000 !important;
font-weight: bold;
text-decoration: underline;
}
/*
.reveal a:link:after,
.reveal a:visited:after {
content: " (" attr(href) ") ";
color: #222 !important;
font-size: 90%;
}
*/
/* SECTION 6: more reveal.js specific additions by @skypanther */
ul, ol, div, p {
visibility: visible;
position: static;
width: auto;
height: auto;
display: block;
overflow: visible;
margin: 0;
text-align: left !important;
}
.reveal pre,
.reveal table {
margin-left: 0;
margin-right: 0;
}
.reveal pre code {
padding: 20px;
border: 1px solid #ddd;
}
.reveal blockquote {
margin: 20px 0;
}
.reveal .slides {
position: static !important;
width: auto !important;
height: auto !important;
left: 0 !important;
top: 0 !important;
margin-left: 0 !important;
margin-top: 0 !important;
padding: 0 !important;
zoom: 1 !important;
overflow: visible !important;
display: block !important;
text-align: left !important;
-webkit-perspective: none;
-moz-perspective: none;
-ms-perspective: none;
perspective: none;
-webkit-perspective-origin: 50% 50%;
-moz-perspective-origin: 50% 50%;
-ms-perspective-origin: 50% 50%;
perspective-origin: 50% 50%;
}
.reveal .slides section {
visibility: visible !important;
position: static !important;
width: auto !important;
height: auto !important;
display: block !important;
overflow: visible !important;
left: 0 !important;
top: 0 !important;
margin-left: 0 !important;
margin-top: 0 !important;
padding: 60px 20px !important;
z-index: auto !important;
opacity: 1 !important;
page-break-after: always !important;
-webkit-transform-style: flat !important;
-moz-transform-style: flat !important;
-ms-transform-style: flat !important;
transform-style: flat !important;
-webkit-transform: none !important;
-moz-transform: none !important;
-ms-transform: none !important;
transform: none !important;
-webkit-transition: none !important;
-moz-transition: none !important;
-ms-transition: none !important;
transition: none !important;
}
.reveal .slides section.stack {
padding: 0 !important;
}
.reveal section:last-of-type {
page-break-after: avoid !important;
}
.reveal section .fragment {
opacity: 1 !important;
visibility: visible !important;
-webkit-transform: none !important;
-moz-transform: none !important;
-ms-transform: none !important;
transform: none !important;
}
.reveal section img {
display: block;
margin: 15px 0px;
background: rgba(255,255,255,1);
border: 1px solid #666;
box-shadow: none;
}
.reveal section small {
font-size: 0.8em;
}
}

160
Pepiniere/ansible/Formation/revealjs/css/print/pdf.css

@ -1,160 +0,0 @@
/**
* This stylesheet is used to print reveal.js
* presentations to PDF.
*
* https://github.com/hakimel/reveal.js#pdf-export
*/
* {
-webkit-print-color-adjust: exact;
}
body {
margin: 0 auto !important;
border: 0;
padding: 0;
float: none !important;
overflow: visible;
}
html {
width: 100%;
height: 100%;
overflow: visible;
}
/* Remove any elements not needed in print. */
.nestedarrow,
.reveal .controls,
.reveal .progress,
.reveal .playback,
.reveal.overview,
.fork-reveal,
.share-reveal,
.state-background {
display: none !important;
}
h1, h2, h3, h4, h5, h6 {
text-shadow: 0 0 0 #000 !important;
}
.reveal pre code {
overflow: hidden !important;
font-family: Courier, 'Courier New', monospace !important;
}
ul, ol, div, p {
visibility: visible;
position: static;
width: auto;
height: auto;
display: block;
overflow: visible;
margin: auto;
}
.reveal {
width: auto !important;
height: auto !important;
overflow: hidden !important;
}
.reveal .slides {
position: static;
width: 100%;
height: auto;
left: auto;
top: auto;
margin: 0 !important;
padding: 0 !important;
overflow: visible;
display: block;
-webkit-perspective: none;
-moz-perspective: none;
-ms-perspective: none;
perspective: none;
-webkit-perspective-origin: 50% 50%; /* there isn't a none/auto value but 50-50 is the default */
-moz-perspective-origin: 50% 50%;
-ms-perspective-origin: 50% 50%;
perspective-origin: 50% 50%;
}
.reveal .slides section {
page-break-after: always !important;
visibility: visible !important;
position: relative !important;
display: block !important;
position: relative !important;
margin: 0 !important;
padding: 0 !important;
box-sizing: border-box !important;
min-height: 1px;
opacity: 1 !important;
-webkit-transform-style: flat !important;
-moz-transform-style: flat !important;
-ms-transform-style: flat !important;
transform-style: flat !important;
-webkit-transform: none !important;
-moz-transform: none !important;
-ms-transform: none !important;
transform: none !important;
}
.reveal section.stack {
margin: 0 !important;
padding: 0 !important;
page-break-after: avoid !important;
height: auto !important;
min-height: auto !important;
}
.reveal img {
box-shadow: none;
}
.reveal .roll {
overflow: visible;
line-height: 1em;
}
/* Slide backgrounds are placed inside of their slide when exporting to PDF */
.reveal section .slide-background {
display: block !important;
position: absolute;
top: 0;
left: 0;
width: 100%;
z-index: -1;
}
/* All elements should be above the slide-background */
.reveal section>* {
position: relative;
z-index: 1;
}
/* Display slide speaker notes when 'showNotes' is enabled */
.reveal .speaker-notes-pdf {
display: block;
width: 100%;
max-height: none;
left: auto;
top: auto;
z-index: 100;
}
/* Display slide numbers when 'slideNumber' is enabled */
.reveal .slide-number-pdf {
display: block;
position: absolute;
font-size: 14px;
}

1387
Pepiniere/ansible/Formation/revealjs/css/reveal.css

File diff suppressed because it is too large Load Diff

1411
Pepiniere/ansible/Formation/revealjs/css/reveal.scss

File diff suppressed because it is too large Load Diff

21
Pepiniere/ansible/Formation/revealjs/css/theme/README.md

@ -1,21 +0,0 @@
## Dependencies
Themes are written using Sass to keep things modular and reduce the need for repeated selectors across files. Make sure that you have the reveal.js development environment including the Grunt dependencies installed before proceding: https://github.com/hakimel/reveal.js#full-setup
## Creating a Theme
To create your own theme, start by duplicating a ```.scss``` file in [/css/theme/source](https://github.com/hakimel/reveal.js/blob/master/css/theme/source). It will be automatically compiled by Grunt from Sass to CSS (see the [Gruntfile](https://github.com/hakimel/reveal.js/blob/master/Gruntfile.js)) when you run `grunt css-themes`.
Each theme file does four things in the following order:
1. **Include [/css/theme/template/mixins.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/mixins.scss)**
Shared utility functions.
2. **Include [/css/theme/template/settings.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/settings.scss)**
Declares a set of custom variables that the template file (step 4) expects. Can be overridden in step 3.
3. **Override**
This is where you override the default theme. Either by specifying variables (see [settings.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/settings.scss) for reference) or by adding any selectors and styles you please.
4. **Include [/css/theme/template/theme.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/theme.scss)**
The template theme file which will generate final CSS output based on the currently defined variables.

291
Pepiniere/ansible/Formation/revealjs/css/theme/beige.css

@ -1,291 +0,0 @@
/**
* Beige theme for reveal.js.
*
* Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
*/
@import url(../../lib/font/league-gothic/league-gothic.css);
@import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);
/*********************************************
* GLOBAL STYLES
*********************************************/
body {
background: #f7f2d3;
background: -moz-radial-gradient(center, circle cover, white 0%, #f7f2d3 100%);
background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%, white), color-stop(100%, #f7f2d3));
background: -webkit-radial-gradient(center, circle cover, white 0%, #f7f2d3 100%);
background: -o-radial-gradient(center, circle cover, white 0%, #f7f2d3 100%);
background: -ms-radial-gradient(center, circle cover, white 0%, #f7f2d3 100%);
background: radial-gradient(center, circle cover, white 0%, #f7f2d3 100%);
background-color: #f7f3de; }
.reveal {
font-family: "Lato", sans-serif;
font-size: 36px;
font-weight: normal;
color: #333; }
::selection {
color: #fff;
background: rgba(79, 64, 28, 0.99);
text-shadow: none; }
.reveal .slides > section,
.reveal .slides > section > section {
line-height: 1.3;
font-weight: inherit; }
/*********************************************
* HEADERS
*********************************************/
.reveal h1,
.reveal h2,
.reveal h3,
.reveal h4,
.reveal h5,
.reveal h6 {
margin: 0 0 20px 0;
color: #333;
font-family: "League Gothic", Impact, sans-serif;
font-weight: normal;
line-height: 1.2;
letter-spacing: normal;
text-transform: uppercase;
text-shadow: none;
word-wrap: break-word; }
.reveal h1 {
font-size: 3.77em; }
.reveal h2 {
font-size: 2.11em; }
.reveal h3 {
font-size: 1.55em; }
.reveal h4 {
font-size: 1em; }
.reveal h1 {
text-shadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0, 0, 0, 0.1), 0 0 5px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.3), 0 3px 5px rgba(0, 0, 0, 0.2), 0 5px 10px rgba(0, 0, 0, 0.25), 0 20px 20px rgba(0, 0, 0, 0.15); }
/*********************************************
* OTHER
*********************************************/
.reveal p {
margin: 20px 0;
line-height: 1.3; }
/* Ensure certain elements are never larger than the slide itself */
.reveal img,
.reveal video,
.reveal iframe {
max-width: 95%;
max-height: 95%; }
.reveal strong,
.reveal b {
font-weight: bold; }
.reveal em {
font-style: italic; }
.reveal ol,
.reveal dl,
.reveal ul {
display: inline-block;
text-align: left;
margin: 0 0 0 1em; }
.reveal ol {
list-style-type: decimal; }
.reveal ul {
list-style-type: disc; }
.reveal ul ul {
list-style-type: square; }
.reveal ul ul ul {
list-style-type: circle; }
.reveal ul ul,
.reveal ul ol,
.reveal ol ol,
.reveal ol ul {
display: block;
margin-left: 40px; }
.reveal dt {
font-weight: bold; }
.reveal dd {
margin-left: 40px; }
.reveal q,
.reveal blockquote {
quotes: none; }
.reveal blockquote {
display: block;
position: relative;
width: 70%;
margin: 20px auto;
padding: 5px;
font-style: italic;
background: rgba(255, 255, 255, 0.05);
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2); }
.reveal blockquote p:first-child,
.reveal blockquote p:last-child {
display: inline-block; }
.reveal q {
font-style: italic; }
.reveal pre {
display: block;
position: relative;
width: 90%;
margin: 20px auto;
text-align: left;
font-size: 0.55em;
font-family: monospace;
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
.reveal code {
font-family: monospace; }
.reveal pre code {
display: block;
padding: 5px;
overflow: auto;
max-height: 400px;
word-wrap: normal; }
.reveal table {
margin: auto;
border-collapse: collapse;
border-spacing: 0; }
.reveal table th {
font-weight: bold; }
.reveal table th,
.reveal table td {
text-align: left;
padding: 0.2em 0.5em 0.2em 0.5em;
border-bottom: 1px solid; }
.reveal table th[align="center"],
.reveal table td[align="center"] {
text-align: center; }
.reveal table th[align="right"],
.reveal table td[align="right"] {
text-align: right; }
.reveal table tbody tr:last-child th,
.reveal table tbody tr:last-child td {
border-bottom: none; }
.reveal sup {
vertical-align: super; }
.reveal sub {
vertical-align: sub; }
.reveal small {
display: inline-block;
font-size: 0.6em;
line-height: 1.2em;
vertical-align: top; }
.reveal small * {
vertical-align: top; }
/*********************************************
* LINKS
*********************************************/
.reveal a {
color: #8b743d;
text-decoration: none;
-webkit-transition: color .15s ease;
-moz-transition: color .15s ease;
transition: color .15s ease; }
.reveal a:hover {
color: #c0a86e;
text-shadow: none;
border: none; }
.reveal .roll span:after {
color: #fff;
background: #564826; }
/*********************************************
* IMAGES
*********************************************/
.reveal section img {
margin: 15px 0px;
background: rgba(255, 255, 255, 0.12);
border: 4px solid #333;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15); }
.reveal section img.plain {
border: 0;
box-shadow: none; }
.reveal a img {
-webkit-transition: all .15s linear;
-moz-transition: all .15s linear;
transition: all .15s linear; }
.reveal a:hover img {
background: rgba(255, 255, 255, 0.2);
border-color: #8b743d;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); }
/*********************************************
* NAVIGATION CONTROLS
*********************************************/
.reveal .controls .navigate-left,
.reveal .controls .navigate-left.enabled {
border-right-color: #8b743d; }
.reveal .controls .navigate-right,
.reveal .controls .navigate-right.enabled {
border-left-color: #8b743d; }
.reveal .controls .navigate-up,
.reveal .controls .navigate-up.enabled {
border-bottom-color: #8b743d; }
.reveal .controls .navigate-down,
.reveal .controls .navigate-down.enabled {
border-top-color: #8b743d; }
.reveal .controls .navigate-left.enabled:hover {
border-right-color: #c0a86e; }
.reveal .controls .navigate-right.enabled:hover {
border-left-color: #c0a86e; }
.reveal .controls .navigate-up.enabled:hover {
border-bottom-color: #c0a86e; }
.reveal .controls .navigate-down.enabled:hover {
border-top-color: #c0a86e; }
/*********************************************
* PROGRESS BAR
*********************************************/
.reveal .progress {
background: rgba(0, 0, 0, 0.2); }
.reveal .progress span {
background: #8b743d;
-webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
-moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }

287
Pepiniere/ansible/Formation/revealjs/css/theme/black.css

@ -1,287 +0,0 @@
/**
* Black theme for reveal.js. This is the opposite of the 'white' theme.
*
* By Hakim El Hattab, http://hakim.se
*/
@import url(../../lib/font/source-sans-pro/source-sans-pro.css);
section.has-light-background, section.has-light-background h1, section.has-light-background h2, section.has-light-background h3, section.has-light-background h4, section.has-light-background h5, section.has-light-background h6 {
color: #222; }
/*********************************************
* GLOBAL STYLES
*********************************************/
body {
background: #222;
background-color: #222; }
.reveal {
font-family: "Source Sans Pro", Helvetica, sans-serif;
font-size: 38px;
font-weight: normal;
color: #fff; }
::selection {
color: #fff;
background: #bee4fd;
text-shadow: none; }
.reveal .slides > section,
.reveal .slides > section > section {
line-height: 1.3;
font-weight: inherit; }
/*********************************************
* HEADERS
*********************************************/
.reveal h1,
.reveal h2,
.reveal h3,
.reveal h4,
.reveal h5,
.reveal h6 {
margin: 0 0 20px 0;
color: #fff;
font-family: "Source Sans Pro", Helvetica, sans-serif;
font-weight: 600;
line-height: 1.2;
letter-spacing: normal;
text-transform: uppercase;
text-shadow: none;
word-wrap: break-word; }
.reveal h1 {
font-size: 2.5em; }
.reveal h2 {
font-size: 1.6em; }
.reveal h3 {
font-size: 1.3em; }
.reveal h4 {
font-size: 1em; }
.reveal h1 {
text-shadow: none; }
/*********************************************
* OTHER
*********************************************/
.reveal p {
margin: 20px 0;
line-height: 1.3; }
/* Ensure certain elements are never larger than the slide itself */
.reveal img,
.reveal video,
.reveal iframe {
max-width: 95%;
max-height: 95%; }
.reveal strong,
.reveal b {
font-weight: bold; }
.reveal em {
font-style: italic; }
.reveal ol,
.reveal dl,
.reveal ul {
display: inline-block;
text-align: left;
margin: 0 0 0 1em; }
.reveal ol {
list-style-type: decimal; }
.reveal ul {
list-style-type: disc; }
.reveal ul ul {
list-style-type: square; }
.reveal ul ul ul {
list-style-type: circle; }
.reveal ul ul,
.reveal ul ol,
.reveal ol ol,
.reveal ol ul {
display: block;
margin-left: 40px; }
.reveal dt {
font-weight: bold; }
.reveal dd {
margin-left: 40px; }
.reveal q,
.reveal blockquote {
quotes: none; }
.reveal blockquote {
display: block;
position: relative;
width: 70%;
margin: 20px auto;
padding: 5px;
font-style: italic;
background: rgba(255, 255, 255, 0.05);
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2); }
.reveal blockquote p:first-child,
.reveal blockquote p:last-child {
display: inline-block; }
.reveal q {
font-style: italic; }
.reveal pre {
display: block;
position: relative;
width: 90%;
margin: 20px auto;
text-align: left;
font-size: 0.55em;
font-family: monospace;
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
.reveal code {
font-family: monospace; }
.reveal pre code {
display: block;
padding: 5px;
overflow: auto;
max-height: 400px;
word-wrap: normal; }
.reveal table {
margin: auto;
border-collapse: collapse;
border-spacing: 0; }
.reveal table th {
font-weight: bold; }
.reveal table th,
.reveal table td {
text-align: left;
padding: 0.2em 0.5em 0.2em 0.5em;
border-bottom: 1px solid; }
.reveal table th[align="center"],
.reveal table td[align="center"] {
text-align: center; }
.reveal table th[align="right"],
.reveal table td[align="right"] {
text-align: right; }
.reveal table tbody tr:last-child th,
.reveal table tbody tr:last-child td {
border-bottom: none; }
.reveal sup {
vertical-align: super; }
.reveal sub {
vertical-align: sub; }
.reveal small {
display: inline-block;
font-size: 0.6em;
line-height: 1.2em;
vertical-align: top; }
.reveal small * {
vertical-align: top; }
/*********************************************
* LINKS
*********************************************/
.reveal a {
color: #42affa;
text-decoration: none;
-webkit-transition: color .15s ease;
-moz-transition: color .15s ease;
transition: color .15s ease; }
.reveal a:hover {
color: #8dcffc;
text-shadow: none;
border: none; }
.reveal .roll span:after {
color: #fff;
background: #068de9; }
/*********************************************
* IMAGES
*********************************************/
.reveal section img {
margin: 15px 0px;
background: rgba(255, 255, 255, 0.12);
border: 4px solid #fff;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15); }
.reveal section img.plain {
border: 0;
box-shadow: none; }
.reveal a img {
-webkit-transition: all .15s linear;
-moz-transition: all .15s linear;
transition: all .15s linear; }
.reveal a:hover img {
background: rgba(255, 255, 255, 0.2);
border-color: #42affa;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); }
/*********************************************
* NAVIGATION CONTROLS
*********************************************/
.reveal .controls .navigate-left,
.reveal .controls .navigate-left.enabled {
border-right-color: #42affa; }
.reveal .controls .navigate-right,
.reveal .controls .navigate-right.enabled {
border-left-color: #42affa; }
.reveal .controls .navigate-up,
.reveal .controls .navigate-up.enabled {
border-bottom-color: #42affa; }
.reveal .controls .navigate-down,
.reveal .controls .navigate-down.enabled {
border-top-color: #42affa; }
.reveal .controls .navigate-left.enabled:hover {
border-right-color: #8dcffc; }
.reveal .controls .navigate-right.enabled:hover {
border-left-color: #8dcffc; }
.reveal .controls .navigate-up.enabled:hover {
border-bottom-color: #8dcffc; }
.reveal .controls .navigate-down.enabled:hover {
border-top-color: #8dcffc; }
/*********************************************
* PROGRESS BAR
*********************************************/
.reveal .progress {
background: rgba(0, 0, 0, 0.2); }
.reveal .progress span {
background: #42affa;
-webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
-moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }

310
Pepiniere/ansible/Formation/revealjs/css/theme/blood.css

@ -1,310 +0,0 @@
/**
* Blood theme for reveal.js
* Author: Walther http://github.com/Walther
*
* Designed to be used with highlight.js theme
* "monokai_sublime.css" available from
* https://github.com/isagalaev/highlight.js/
*
* For other themes, change $codeBackground accordingly.
*
*/
@import url(https://fonts.googleapis.com/css?family=Ubuntu:300,700,300italic,700italic);
/*********************************************
* GLOBAL STYLES
*********************************************/
body {
background: #222;
background-color: #222; }
.reveal {
font-family: Ubuntu, "sans-serif";
font-size: 36px;
font-weight: normal;
color: #eee; }
::selection {
color: #fff;
background: #a23;
text-shadow: none; }
.reveal .slides > section,
.reveal .slides > section > section {
line-height: 1.3;
font-weight: inherit; }
/*********************************************
* HEADERS
*********************************************/
.reveal h1,
.reveal h2,
.reveal h3,
.reveal h4,
.reveal h5,
.reveal h6 {
margin: 0 0 20px 0;
color: #eee;
font-family: Ubuntu, "sans-serif";
font-weight: normal;
line-height: 1.2;
letter-spacing: normal;
text-transform: uppercase;
text-shadow: 2px 2px 2px #222;
word-wrap: break-word; }
.reveal h1 {
font-size: 3.77em; }
.reveal h2 {
font-size: 2.11em; }
.reveal h3 {
font-size: 1.55em; }
.reveal h4 {
font-size: 1em; }
.reveal h1 {
text-shadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0, 0, 0, 0.1), 0 0 5px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.3), 0 3px 5px rgba(0, 0, 0, 0.2), 0 5px 10px rgba(0, 0, 0, 0.25), 0 20px 20px rgba(0, 0, 0, 0.15); }
/*********************************************
* OTHER
*********************************************/
.reveal p {
margin: 20px 0;
line-height: 1.3; }
/* Ensure certain elements are never larger than the slide itself */
.reveal img,
.reveal video,
.reveal iframe {
max-width: 95%;
max-height: 95%; }
.reveal strong,
.reveal b {
font-weight: bold; }
.reveal em {
font-style: italic; }
.reveal ol,
.reveal dl,
.reveal ul {
display: inline-block;
text-align: left;
margin: 0 0 0 1em; }
.reveal ol {
list-style-type: decimal; }
.reveal ul {
list-style-type: disc; }
.reveal ul ul {
list-style-type: square; }
.reveal ul ul ul {
list-style-type: circle; }
.reveal ul ul,
.reveal ul ol,
.reveal ol ol,
.reveal ol ul {
display: block;
margin-left: 40px; }
.reveal dt {
font-weight: bold; }
.reveal dd {
margin-left: 40px; }
.reveal q,
.reveal blockquote {
quotes: none; }
.reveal blockquote {
display: block;
position: relative;
width: 70%;
margin: 20px auto;
padding: 5px;
font-style: italic;
background: rgba(255, 255, 255, 0.05);
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2); }
.reveal blockquote p:first-child,
.reveal blockquote p:last-child {
display: inline-block; }
.reveal q {
font-style: italic; }
.reveal pre {
display: block;
position: relative;
width: 90%;
margin: 20px auto;
text-align: left;
font-size: 0.55em;
font-family: monospace;
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
.reveal code {
font-family: monospace; }
.reveal pre code {
display: block;
padding: 5px;
overflow: auto;
max-height: 400px;
word-wrap: normal; }
.reveal table {
margin: auto;
border-collapse: collapse;
border-spacing: 0; }
.reveal table th {
font-weight: bold; }
.reveal table th,
.reveal table td {
text-align: left;
padding: 0.2em 0.5em 0.2em 0.5em;
border-bottom: 1px solid; }
.reveal table th[align="center"],
.reveal table td[align="center"] {
text-align: center; }
.reveal table th[align="right"],
.reveal table td[align="right"] {
text-align: right; }
.reveal table tbody tr:last-child th,
.reveal table tbody tr:last-child td {
border-bottom: none; }
.reveal sup {
vertical-align: super; }
.reveal sub {
vertical-align: sub; }
.reveal small {
display: inline-block;
font-size: 0.6em;
line-height: 1.2em;
vertical-align: top; }
.reveal small * {
vertical-align: top; }
/*********************************************
* LINKS
*********************************************/
.reveal a {
color: #a23;
text-decoration: none;
-webkit-transition: color .15s ease;
-moz-transition: color .15s ease;
transition: color .15s ease; }
.reveal a:hover {
color: #dd5566;
text-shadow: none;
border: none; }
.reveal .roll span:after {
color: #fff;
background: #6a1520; }
/*********************************************
* IMAGES
*********************************************/
.reveal section img {
margin: 15px 0px;
background: rgba(255, 255, 255, 0.12);
border: 4px solid #eee;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15); }
.reveal section img.plain {
border: 0;
box-shadow: none; }
.reveal a img {
-webkit-transition: all .15s linear;
-moz-transition: all .15s linear;
transition: all .15s linear; }
.reveal a:hover img {
background: rgba(255, 255, 255, 0.2);
border-color: #a23;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); }
/*********************************************
* NAVIGATION CONTROLS
*********************************************/
.reveal .controls .navigate-left,
.reveal .controls .navigate-left.enabled {
border-right-color: #a23; }
.reveal .controls .navigate-right,
.reveal .controls .navigate-right.enabled {
border-left-color: #a23; }
.reveal .controls .navigate-up,
.reveal .controls .navigate-up.enabled {
border-bottom-color: #a23; }
.reveal .controls .navigate-down,
.reveal .controls .navigate-down.enabled {
border-top-color: #a23; }
.reveal .controls .navigate-left.enabled:hover {
border-right-color: #dd5566; }
.reveal .controls .navigate-right.enabled:hover {
border-left-color: #dd5566; }
.reveal .controls .navigate-up.enabled:hover {
border-bottom-color: #dd5566; }
.reveal .controls .navigate-down.enabled:hover {
border-top-color: #dd5566; }
/*********************************************
* PROGRESS BAR
*********************************************/
.reveal .progress {
background: rgba(0, 0, 0, 0.2); }
.reveal .progress span {
background: #a23;
-webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
-moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
.reveal p {
font-weight: 300;
text-shadow: 1px 1px #222; }
.reveal h1,
.reveal h2,
.reveal h3,
.reveal h4,
.reveal h5,
.reveal h6 {
font-weight: 700; }
.reveal p code {
background-color: #23241f;
display: inline-block;
border-radius: 7px; }
.reveal small code {
vertical-align: baseline; }

293
Pepiniere/ansible/Formation/revealjs/css/theme/league.css

@ -1,293 +0,0 @@
/**
* League theme for reveal.js.
*
* This was the default theme pre-3.0.0.
*
* Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
*/
@import url(../../lib/font/league-gothic/league-gothic.css);
@import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);
/*********************************************
* GLOBAL STYLES
*********************************************/
body {
background: #1c1e20;
background: -moz-radial-gradient(center, circle cover, #555a5f 0%, #1c1e20 100%);
background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%, #555a5f), color-stop(100%, #1c1e20));
background: -webkit-radial-gradient(center, circle cover, #555a5f 0%, #1c1e20 100%);
background: -o-radial-gradient(center, circle cover, #555a5f 0%, #1c1e20 100%);
background: -ms-radial-gradient(center, circle cover, #555a5f 0%, #1c1e20 100%);
background: radial-gradient(center, circle cover, #555a5f 0%, #1c1e20 100%);
background-color: #2b2b2b; }
.reveal {
font-family: "Lato", sans-serif;
font-size: 36px;
font-weight: normal;
color: #eee; }
::selection {
color: #fff;
background: #FF5E99;
text-shadow: none; }
.reveal .slides > section,
.reveal .slides > section > section {
line-height: 1.3;
font-weight: inherit; }
/*********************************************
* HEADERS
*********************************************/
.reveal h1,
.reveal h2,
.reveal h3,
.reveal h4,
.reveal h5,
.reveal h6 {
margin: 0 0 20px 0;
color: #eee;
font-family: "League Gothic", Impact, sans-serif;
font-weight: normal;
line-height: 1.2;
letter-spacing: normal;
text-transform: uppercase;
text-shadow: 0px 0px 6px rgba(0, 0, 0, 0.2);
word-wrap: break-word; }
.reveal h1 {
font-size: 3.77em; }
.reveal h2 {
font-size: 2.11em; }
.reveal h3 {
font-size: 1.55em; }
.reveal h4 {
font-size: 1em; }
.reveal h1 {
text-shadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0, 0, 0, 0.1), 0 0 5px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.3), 0 3px 5px rgba(0, 0, 0, 0.2), 0 5px 10px rgba(0, 0, 0, 0.25), 0 20px 20px rgba(0, 0, 0, 0.15); }
/*********************************************
* OTHER
*********************************************/
.reveal p {
margin: 20px 0;
line-height: 1.3; }
/* Ensure certain elements are never larger than the slide itself */
.reveal img,
.reveal video,
.reveal iframe {
max-width: 95%;
max-height: 95%; }
.reveal strong,
.reveal b {
font-weight: bold; }
.reveal em {
font-style: italic; }
.reveal ol,
.reveal dl,
.reveal ul {
display: inline-block;
text-align: left;
margin: 0 0 0 1em; }
.reveal ol {
list-style-type: decimal; }
.reveal ul {
list-style-type: disc; }
.reveal ul ul {
list-style-type: square; }
.reveal ul ul ul {
list-style-type: circle; }
.reveal ul ul,
.reveal ul ol,
.reveal ol ol,
.reveal ol ul {
display: block;
margin-left: 40px; }
.reveal dt {
font-weight: bold; }
.reveal dd {
margin-left: 40px; }
.reveal q,
.reveal blockquote {
quotes: none; }
.reveal blockquote {
display: block;
position: relative;
width: 70%;
margin: 20px auto;
padding: 5px;
font-style: italic;
background: rgba(255, 255, 255, 0.05);
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2); }
.reveal blockquote p:first-child,
.reveal blockquote p:last-child {
display: inline-block; }
.reveal q {
font-style: italic; }
.reveal pre {
display: block;
position: relative;
width: 90%;
margin: 20px auto;
text-align: left;
font-size: 0.55em;
font-family: monospace;
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
.reveal code {
font-family: monospace; }
.reveal pre code {
display: block;
padding: 5px;
overflow: auto;
max-height: 400px;
word-wrap: normal; }
.reveal table {
margin: auto;
border-collapse: collapse;
border-spacing: 0; }
.reveal table th {
font-weight: bold; }
.reveal table th,
.reveal table td {
text-align: left;
padding: 0.2em 0.5em 0.2em 0.5em;
border-bottom: 1px solid; }
.reveal table th[align="center"],
.reveal table td[align="center"] {
text-align: center; }
.reveal table th[align="right"],
.reveal table td[align="right"] {
text-align: right; }
.reveal table tbody tr:last-child th,
.reveal table tbody tr:last-child td {
border-bottom: none; }
.reveal sup {
vertical-align: super; }
.reveal sub {
vertical-align: sub; }
.reveal small {
display: inline-block;
font-size: 0.6em;
line-height: 1.2em;
vertical-align: top; }
.reveal small * {
vertical-align: top; }
/*********************************************
* LINKS
*********************************************/
.reveal a {
color: #13DAEC;
text-decoration: none;
-webkit-transition: color .15s ease;
-moz-transition: color .15s ease;
transition: color .15s ease; }
.reveal a:hover {
color: #71e9f4;
text-shadow: none;
border: none; }
.reveal .roll span:after {
color: #fff;
background: #0d99a5; }
/*********************************************
* IMAGES
*********************************************/
.reveal section img {
margin: 15px 0px;
background: rgba(255, 255, 255, 0.12);
border: 4px solid #eee;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15); }
.reveal section img.plain {
border: 0;
box-shadow: none; }
.reveal a img {
-webkit-transition: all .15s linear;
-moz-transition: all .15s linear;
transition: all .15s linear; }
.reveal a:hover img {
background: rgba(255, 255, 255, 0.2);
border-color: #13DAEC;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); }
/*********************************************
* NAVIGATION CONTROLS
*********************************************/
.reveal .controls .navigate-left,
.reveal .controls .navigate-left.enabled {
border-right-color: #13DAEC; }
.reveal .controls .navigate-right,
.reveal .controls .navigate-right.enabled {
border-left-color: #13DAEC; }
.reveal .controls .navigate-up,
.reveal .controls .navigate-up.enabled {
border-bottom-color: #13DAEC; }
.reveal .controls .navigate-down,
.reveal .controls .navigate-down.enabled {
border-top-color: #13DAEC; }
.reveal .controls .navigate-left.enabled:hover {
border-right-color: #71e9f4; }
.reveal .controls .navigate-right.enabled:hover {
border-left-color: #71e9f4; }
.reveal .controls .navigate-up.enabled:hover {
border-bottom-color: #71e9f4; }
.reveal .controls .navigate-down.enabled:hover {
border-top-color: #71e9f4; }
/*********************************************
* PROGRESS BAR
*********************************************/
.reveal .progress {
background: rgba(0, 0, 0, 0.2); }
.reveal .progress span {
background: #13DAEC;
-webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
-moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }

291
Pepiniere/ansible/Formation/revealjs/css/theme/moon.css

@ -1,291 +0,0 @@
/**
* Solarized Dark theme for reveal.js.
* Author: Achim Staebler
*/
@import url(../../lib/font/league-gothic/league-gothic.css);
@import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);
/**
* Solarized colors by Ethan Schoonover
*/
html * {
color-profile: sRGB;
rendering-intent: auto; }
/*********************************************
* GLOBAL STYLES
*********************************************/
body {
background: #002b36;
background-color: #002b36; }
.reveal {
font-family: "Lato", sans-serif;
font-size: 36px;
font-weight: normal;
color: #93a1a1; }
::selection {
color: #fff;
background: #d33682;
text-shadow: none; }
.reveal .slides > section,
.reveal .slides > section > section {
line-height: 1.3;
font-weight: inherit; }
/*********************************************
* HEADERS
*********************************************/
.reveal h1,
.reveal h2,
.reveal h3,
.reveal h4,
.reveal h5,
.reveal h6 {
margin: 0 0 20px 0;
color: #eee8d5;
font-family: "League Gothic", Impact, sans-serif;
font-weight: normal;
line-height: 1.2;
letter-spacing: normal;
text-transform: uppercase;
text-shadow: none;
word-wrap: break-word; }
.reveal h1 {
font-size: 3.77em; }
.reveal h2 {
font-size: 2.11em; }
.reveal h3 {
font-size: 1.55em; }
.reveal h4 {
font-size: 1em; }
.reveal h1 {
text-shadow: none; }
/*********************************************
* OTHER
*********************************************/
.reveal p {
margin: 20px 0;
line-height: 1.3; }
/* Ensure certain elements are never larger than the slide itself */
.reveal img,
.reveal video,
.reveal iframe {
max-width: 95%;
max-height: 95%; }
.reveal strong,
.reveal b {
font-weight: bold; }
.reveal em {
font-style: italic; }
.reveal ol,
.reveal dl,
.reveal ul {
display: inline-block;
text-align: left;
margin: 0 0 0 1em; }
.reveal ol {
list-style-type: decimal; }
.reveal ul {
list-style-type: disc; }
.reveal ul ul {
list-style-type: square; }
.reveal ul ul ul {
list-style-type: circle; }
.reveal ul ul,
.reveal ul ol,
.reveal ol ol,
.reveal ol ul {
display: block;
margin-left: 40px; }
.reveal dt {
font-weight: bold; }
.reveal dd {
margin-left: 40px; }
.reveal q,
.reveal blockquote {
quotes: none; }
.reveal blockquote {
display: block;
position: relative;
width: 70%;
margin: 20px auto;
padding: 5px;
font-style: italic;
background: rgba(255, 255, 255, 0.05);
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2); }
.reveal blockquote p:first-child,
.reveal blockquote p:last-child {
display: inline-block; }
.reveal q {
font-style: italic; }
.reveal pre {
display: block;
position: relative;
width: 90%;
margin: 20px auto;
text-align: left;
font-size: 0.55em;
font-family: monospace;
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
.reveal code {
font-family: monospace; }
.reveal pre code {
display: block;
padding: 5px;
overflow: auto;
max-height: 400px;
word-wrap: normal; }
.reveal table {
margin: auto;
border-collapse: collapse;
border-spacing: 0; }
.reveal table th {
font-weight: bold; }
.reveal table th,
.reveal table td {
text-align: left;
padding: 0.2em 0.5em 0.2em 0.5em;
border-bottom: 1px solid; }
.reveal table th[align="center"],
.reveal table td[align="center"] {
text-align: center; }
.reveal table th[align="right"],
.reveal table td[align="right"] {
text-align: right; }
.reveal table tbody tr:last-child th,
.reveal table tbody tr:last-child td {
border-bottom: none; }
.reveal sup {
vertical-align: super; }
.reveal sub {
vertical-align: sub; }
.reveal small {
display: inline-block;
font-size: 0.6em;
line-height: 1.2em;
vertical-align: top; }
.reveal small * {
vertical-align: top; }
/*********************************************
* LINKS
*********************************************/
.reveal a {
color: #268bd2;
text-decoration: none;
-webkit-transition: color .15s ease;
-moz-transition: color .15s ease;
transition: color .15s ease; }
.reveal a:hover {
color: #78b9e6;
text-shadow: none;
border: none; }
.reveal .roll span:after {
color: #fff;
background: #1a6091; }
/*********************************************
* IMAGES
*********************************************/
.reveal section img {
margin: 15px 0px;
background: rgba(255, 255, 255, 0.12);
border: 4px solid #93a1a1;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15); }
.reveal section img.plain {
border: 0;
box-shadow: none; }
.reveal a img {
-webkit-transition: all .15s linear;
-moz-transition: all .15s linear;
transition: all .15s linear; }
.reveal a:hover img {
background: rgba(255, 255, 255, 0.2);
border-color: #268bd2;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); }
/*********************************************
* NAVIGATION CONTROLS
*********************************************/
.reveal .controls .navigate-left,
.reveal .controls .navigate-left.enabled {
border-right-color: #268bd2; }
.reveal .controls .navigate-right,
.reveal .controls .navigate-right.enabled {
border-left-color: #268bd2; }
.reveal .controls .navigate-up,
.reveal .controls .navigate-up.enabled {
border-bottom-color: #268bd2; }
.reveal .controls .navigate-down,
.reveal .controls .navigate-down.enabled {
border-top-color: #268bd2; }
.reveal .controls .navigate-left.enabled:hover {
border-right-color: #78b9e6; }
.reveal .controls .navigate-right.enabled:hover {
border-left-color: #78b9e6; }
.reveal .controls .navigate-up.enabled:hover {
border-bottom-color: #78b9e6; }
.reveal .controls .navigate-down.enabled:hover {
border-top-color: #78b9e6; }
/*********************************************
* PROGRESS BAR
*********************************************/
.reveal .progress {
background: rgba(0, 0, 0, 0.2); }
.reveal .progress span {
background: #268bd2;
-webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
-moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }

285
Pepiniere/ansible/Formation/revealjs/css/theme/night.css

@ -1,285 +0,0 @@
/**
* Black theme for reveal.js.
*
* Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
*/
@import url(https://fonts.googleapis.com/css?family=Montserrat:700);
@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic,700italic);
/*********************************************
* GLOBAL STYLES
*********************************************/
body {
background: #111;
background-color: #111; }
.reveal {
font-family: "Open Sans", sans-serif;
font-size: 30px;
font-weight: normal;
color: #eee; }
::selection {
color: #fff;
background: #e7ad52;
text-shadow: none; }
.reveal .slides > section,
.reveal .slides > section > section {
line-height: 1.3;
font-weight: inherit; }
/*********************************************
* HEADERS
*********************************************/
.reveal h1,
.reveal h2,
.reveal h3,
.reveal h4,
.reveal h5,
.reveal h6 {
margin: 0 0 20px 0;
color: #eee;
font-family: "Montserrat", Impact, sans-serif;
font-weight: normal;
line-height: 1.2;
letter-spacing: -0.03em;
text-transform: none;
text-shadow: none;
word-wrap: break-word; }
.reveal h1 {
font-size: 3.77em; }
.reveal h2 {
font-size: 2.11em; }
.reveal h3 {
font-size: 1.55em; }
.reveal h4 {
font-size: 1em; }
.reveal h1 {
text-shadow: none; }
/*********************************************
* OTHER
*********************************************/
.reveal p {
margin: 20px 0;
line-height: 1.3; }
/* Ensure certain elements are never larger than the slide itself */
.reveal img,
.reveal video,
.reveal iframe {
max-width: 95%;
max-height: 95%; }
.reveal strong,
.reveal b {
font-weight: bold; }
.reveal em {
font-style: italic; }
.reveal ol,
.reveal dl,
.reveal ul {
display: inline-block;
text-align: left;
margin: 0 0 0 1em; }
.reveal ol {
list-style-type: decimal; }
.reveal ul {
list-style-type: disc; }
.reveal ul ul {
list-style-type: square; }
.reveal ul ul ul {
list-style-type: circle; }
.reveal ul ul,
.reveal ul ol,
.reveal ol ol,
.reveal ol ul {
display: block;
margin-left: 40px; }
.reveal dt {
font-weight: bold; }
.reveal dd {
margin-left: 40px; }
.reveal q,
.reveal blockquote {
quotes: none; }
.reveal blockquote {
display: block;
position: relative;
width: 70%;
margin: 20px auto;
padding: 5px;
font-style: italic;
background: rgba(255, 255, 255, 0.05);
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2); }
.reveal blockquote p:first-child,
.reveal blockquote p:last-child {
display: inline-block; }
.reveal q {
font-style: italic; }
.reveal pre {
display: block;
position: relative;
width: 90%;
margin: 20px auto;
text-align: left;
font-size: 0.55em;
font-family: monospace;
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
.reveal code {
font-family: monospace; }
.reveal pre code {
display: block;
padding: 5px;
overflow: auto;
max-height: 400px;
word-wrap: normal; }
.reveal table {
margin: auto;
border-collapse: collapse;
border-spacing: 0; }
.reveal table th {
font-weight: bold; }
.reveal table th,
.reveal table td {
text-align: left;
padding: 0.2em 0.5em 0.2em 0.5em;
border-bottom: 1px solid; }
.reveal table th[align="center"],
.reveal table td[align="center"] {
text-align: center; }
.reveal table th[align="right"],
.reveal table td[align="right"] {
text-align: right; }
.reveal table tbody tr:last-child th,
.reveal table tbody tr:last-child td {
border-bottom: none; }
.reveal sup {
vertical-align: super; }
.reveal sub {
vertical-align: sub; }
.reveal small {
display: inline-block;
font-size: 0.6em;
line-height: 1.2em;
vertical-align: top; }
.reveal small * {
vertical-align: top; }
/*********************************************
* LINKS
*********************************************/
.reveal a {
color: #e7ad52;
text-decoration: none;
-webkit-transition: color .15s ease;
-moz-transition: color .15s ease;
transition: color .15s ease; }
.reveal a:hover {
color: #f3d7ac;
text-shadow: none;
border: none; }
.reveal .roll span:after {
color: #fff;
background: #d08a1d; }
/*********************************************
* IMAGES
*********************************************/
.reveal section img {
margin: 15px 0px;
background: rgba(255, 255, 255, 0.12);
border: 4px solid #eee;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15); }
.reveal section img.plain {
border: 0;
box-shadow: none; }
.reveal a img {
-webkit-transition: all .15s linear;
-moz-transition: all .15s linear;
transition: all .15s linear; }
.reveal a:hover img {
background: rgba(255, 255, 255, 0.2);
border-color: #e7ad52;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); }
/*********************************************
* NAVIGATION CONTROLS
*********************************************/
.reveal .controls .navigate-left,
.reveal .controls .navigate-left.enabled {
border-right-color: #e7ad52; }
.reveal .controls .navigate-right,
.reveal .controls .navigate-right.enabled {
border-left-color: #e7ad52; }
.reveal .controls .navigate-up,
.reveal .controls .navigate-up.enabled {
border-bottom-color: #e7ad52; }
.reveal .controls .navigate-down,
.reveal .controls .navigate-down.enabled {
border-top-color: #e7ad52; }
.reveal .controls .navigate-left.enabled:hover {
border-right-color: #f3d7ac; }
.reveal .controls .navigate-right.enabled:hover {
border-left-color: #f3d7ac; }
.reveal .controls .navigate-up.enabled:hover {
border-bottom-color: #f3d7ac; }
.reveal .controls .navigate-down.enabled:hover {
border-top-color: #f3d7ac; }
/*********************************************
* PROGRESS BAR
*********************************************/
.reveal .progress {
background: rgba(0, 0, 0, 0.2); }
.reveal .progress span {
background: #e7ad52;
-webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
-moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }

287
Pepiniere/ansible/Formation/revealjs/css/theme/serif.css

@ -1,287 +0,0 @@
/**
* A simple theme for reveal.js presentations, similar
* to the default theme. The accent color is brown.
*
* This theme is Copyright (C) 2012-2013 Owen Versteeg, http://owenversteeg.com - it is MIT licensed.
*/
.reveal a {
line-height: 1.3em; }
/*********************************************
* GLOBAL STYLES
*********************************************/
body {
background: #F0F1EB;
background-color: #F0F1EB; }
.reveal {
font-family: "Palatino Linotype", "Book Antiqua", Palatino, FreeSerif, serif;
font-size: 36px;
font-weight: normal;
color: #000; }
::selection {
color: #fff;
background: #26351C;
text-shadow: none; }
.reveal .slides > section,
.reveal .slides > section > section {
line-height: 1.3;
font-weight: inherit; }
/*********************************************
* HEADERS
*********************************************/
.reveal h1,
.reveal h2,
.reveal h3,
.reveal h4,
.reveal h5,
.reveal h6 {
margin: 0 0 20px 0;
color: #383D3D;
font-family: "Palatino Linotype", "Book Antiqua", Palatino, FreeSerif, serif;
font-weight: normal;
line-height: 1.2;
letter-spacing: normal;
text-transform: none;
text-shadow: none;
word-wrap: break-word; }
.reveal h1 {
font-size: 3.77em; }
.reveal h2 {
font-size: 2.11em; }
.reveal h3 {
font-size: 1.55em; }
.reveal h4 {
font-size: 1em; }
.reveal h1 {
text-shadow: none; }
/*********************************************
* OTHER
*********************************************/
.reveal p {
margin: 20px 0;
line-height: 1.3; }
/* Ensure certain elements are never larger than the slide itself */
.reveal img,
.reveal video,
.reveal iframe {
max-width: 95%;
max-height: 95%; }
.reveal strong,
.reveal b {
font-weight: bold; }
.reveal em {
font-style: italic; }
.reveal ol,
.reveal dl,
.reveal ul {
display: inline-block;
text-align: left;
margin: 0 0 0 1em; }
.reveal ol {
list-style-type: decimal; }
.reveal ul {
list-style-type: disc; }
.reveal ul ul {
list-style-type: square; }
.reveal ul ul ul {
list-style-type: circle; }
.reveal ul ul,
.reveal ul ol,
.reveal ol ol,
.reveal ol ul {
display: block;
margin-left: 40px; }
.reveal dt {
font-weight: bold; }
.reveal dd {
margin-left: 40px; }
.reveal q,
.reveal blockquote {
quotes: none; }
.reveal blockquote {
display: block;
position: relative;
width: 70%;
margin: 20px auto;
padding: 5px;
font-style: italic;
background: rgba(255, 255, 255, 0.05);
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2); }
.reveal blockquote p:first-child,
.reveal blockquote p:last-child {
display: inline-block; }
.reveal q {
font-style: italic; }
.reveal pre {
display: block;
position: relative;
width: 90%;
margin: 20px auto;
text-align: left;
font-size: 0.55em;
font-family: monospace;
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
.reveal code {
font-family: monospace; }
.reveal pre code {
display: block;
padding: 5px;
overflow: auto;
max-height: 400px;
word-wrap: normal; }
.reveal table {
margin: auto;
border-collapse: collapse;
border-spacing: 0; }
.reveal table th {
font-weight: bold; }
.reveal table th,
.reveal table td {
text-align: left;
padding: 0.2em 0.5em 0.2em 0.5em;
border-bottom: 1px solid; }
.reveal table th[align="center"],
.reveal table td[align="center"] {
text-align: center; }
.reveal table th[align="right"],
.reveal table td[align="right"] {
text-align: right; }
.reveal table tbody tr:last-child th,
.reveal table tbody tr:last-child td {
border-bottom: none; }
.reveal sup {
vertical-align: super; }
.reveal sub {
vertical-align: sub; }
.reveal small {
display: inline-block;
font-size: 0.6em;
line-height: 1.2em;
vertical-align: top; }
.reveal small * {
vertical-align: top; }
/*********************************************
* LINKS
*********************************************/
.reveal a {
color: #51483D;
text-decoration: none;
-webkit-transition: color .15s ease;
-moz-transition: color .15s ease;
transition: color .15s ease; }
.reveal a:hover {
color: #8b7c69;
text-shadow: none;
border: none; }
.reveal .roll span:after {
color: #fff;
background: #25211c; }
/*********************************************
* IMAGES
*********************************************/
.reveal section img {
margin: 15px 0px;
background: rgba(255, 255, 255, 0.12);
border: 4px solid #000;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15); }
.reveal section img.plain {
border: 0;
box-shadow: none; }
.reveal a img {
-webkit-transition: all .15s linear;
-moz-transition: all .15s linear;
transition: all .15s linear; }
.reveal a:hover img {
background: rgba(255, 255, 255, 0.2);
border-color: #51483D;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); }
/*********************************************
* NAVIGATION CONTROLS
*********************************************/
.reveal .controls .navigate-left,
.reveal .controls .navigate-left.enabled {
border-right-color: #51483D; }
.reveal .controls .navigate-right,
.reveal .controls .navigate-right.enabled {
border-left-color: #51483D; }
.reveal .controls .navigate-up,
.reveal .controls .navigate-up.enabled {
border-bottom-color: #51483D; }
.reveal .controls .navigate-down,
.reveal .controls .navigate-down.enabled {
border-top-color: #51483D; }
.reveal .controls .navigate-left.enabled:hover {
border-right-color: #8b7c69; }
.reveal .controls .navigate-right.enabled:hover {
border-left-color: #8b7c69; }
.reveal .controls .navigate-up.enabled:hover {
border-bottom-color: #8b7c69; }
.reveal .controls .navigate-down.enabled:hover {
border-top-color: #8b7c69; }
/*********************************************
* PROGRESS BAR
*********************************************/
.reveal .progress {
background: rgba(0, 0, 0, 0.2); }
.reveal .progress span {
background: #51483D;
-webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
-moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }

367
Pepiniere/ansible/Formation/revealjs/css/theme/sii.css

@ -1,367 +0,0 @@
/**
* SII theme for reveal.js. This theme is based on official White theme.
*
*/
@import url(../../lib/font/source-sans-pro/source-sans-pro.css);
section.has-dark-background, section.has-dark-background h1, section.has-dark-background h2, section.has-dark-background h3, section.has-dark-background h4, section.has-dark-background h5, section.has-dark-background h6 {
color: #fff; }
/*********************************************
* GLOBAL STYLES
*********************************************/
.align-left p{
text-align: left;
}
.min-code code {
font-size: 18px;
line-height: 1;
}
.min-code-14 code {
font-size: 14px;
line-height: 1;
}
html {
background-color: #fff; /* fix dark background on full screen mode */ }
body {
background: #fff;
background-color: #fff;
background-image: url('../../images/header-sii.png'); /* SII header with 5 colors */
background-size: contain;
background-repeat: no-repeat; }
.reveal {
font-family: "Source Sans Pro", Helvetica, sans-serif;
font-size: 36px;
font-weight: normal;
color: #222; }
::selection {
color: #fff;
background: #98bdef;
text-shadow: none; }
.reveal .slides > section,
.reveal .slides > section > section {
line-height: 1.3;
font-weight: inherit; }
/*********************************************
* HEADERS
*********************************************/
.reveal h1,
.reveal h2,
.reveal h3,
.reveal h4,
.reveal h5,
.reveal h6 {
margin: 0 0 20px 0;
color: #222;
font-family: "Source Sans Pro", Helvetica, sans-serif;
font-weight: 600;
line-height: 1.2;
letter-spacing: normal;
text-transform: uppercase;
text-shadow: none;
word-wrap: break-word; }
.reveal h1 {
font-size: 2.5em; }
.reveal h2 {
font-size: 1.6em; }
.reveal h3 {
font-size: 1.3em; }
.reveal h4 {
font-size: 1em; }
.reveal h1 {
text-shadow: none; }
/*********************************************
* OTHER
*********************************************/
.reveal p {
margin: 20px 0;
line-height: 1.3; }
/* Ensure certain elements are never larger than the slide itself */
.reveal img,
.reveal video,
.reveal iframe {
max-width: 95%;
max-height: 95%; }
.reveal strong,
.reveal b {
font-weight: bold; }
.reveal em {
/*color: #559BDB; */
text-decoration: underline;}
.reveal pre em {
text-decoration: none;
}
.reveal ol,
.reveal dl,
.reveal ul {
display: inline-block;
text-align: left;
margin: 0 0 0 1em; }
.reveal ol {
list-style-type: decimal; }
.reveal ul {
list-style-type: square; }
.reveal ul ul {
list-style-type: disc; }
.reveal ul ul ul {
list-style-type: circle; }
.reveal ul ul,
.reveal ul ol,
.reveal ol ol,
.reveal ol ul {
display: block;
margin-left: 40px; }
.reveal dt {
font-weight: bold; }
.reveal dd {
margin-left: 40px; }
.reveal q,
.reveal blockquote {
quotes: none; }
.reveal blockquote {
display: block;
position: relative;
width: 70%;
margin: 20px auto;
padding: 5px;
font-style: italic;
background: rgba(255, 255, 255, 0.05);
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2); }
.reveal blockquote p:first-child,
.reveal blockquote p:last-child {
display: inline-block; }
.reveal q {
font-style: italic; }
.reveal li pre,
.reveal pre {
display: block;
position: relative;
width: 90%;
margin: 20px auto;
text-align: left;
font-family: monospace;
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3);
width: 100%;
font-size: 1.5rem; }
.reveal code {
font-family: monospace; }
.reveal li pre code {
background-color: #3F3F3F;
color: #DCDCDC;
font-size: 1.2rem;
line-height: 1.1em;
}
.reveal li pre code,
.reveal pre code {
display: block;
padding: 5px;
overflow: auto;
max-height: 400px;
word-wrap: normal; }
.lang-nohighlight {
background-color: #3F3F3F;
color: #DCDCDC;
}
.reveal table {
margin: auto;
border-collapse: collapse;
border-spacing: 0; }
.reveal table th {
font-weight: bold; }
.reveal table th,
.reveal table td {
text-align: left;
padding: 0.2em 0.5em 0.2em 0.5em;
border-bottom: 1px solid; }
.reveal table th[align="center"],
.reveal table td[align="center"] {
text-align: center; }
.reveal table th[align="right"],
.reveal table td[align="right"] {
text-align: right; }
.reveal sup {
vertical-align: super; }
.reveal sub {
vertical-align: sub; }
.reveal small {
font-size: 0.6em;
line-height: 1.2em; }
.reveal p small code {
font-size: 1em; }
/*********************************************
* LINKS
*********************************************/
.reveal a {
color: #6ca0e8;
text-decoration: underline;
-webkit-transition: color .15s ease;
-moz-transition: color .15s ease;
transition: color .15s ease; }
.reveal a:hover {
color: #2a76dd;
border: none; }
.reveal .roll span:after {
color: #fff;
background: #1a53a1; }
/*********************************************
* IMAGES
*********************************************/
.reveal section img {
margin: 15px 0px;
}
.reveal section img.plain {
border: 0;
box-shadow: none; }
.reveal a img {
-webkit-transition: all .15s linear;
-moz-transition: all .15s linear;
transition: all .15s linear; }
.reveal a:hover img {
background: rgba(255, 255, 255, 0.2);
border-color: #2a76dd;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); }
/*********************************************
* PROGRESS BAR
*********************************************/
.reveal .progress {
background: rgba(0, 0, 0, 0.2); }
.reveal .progress span {
-webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
-moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
/*********************************************
* Custom size for code
*********************************************/
.reveal ul code,
.reveal p code ,
.reveal td code {
padding: 0.1rem 0.4rem;
background-color: #dcdcdc;
color: #3F3F3F;
/* font-size: 2rem; */
}
.reveal pre {
width: 100%;
}
.reveal td code {
padding: 0 0.5rem;
}
/*********************************************
* Custom size for tables
*********************************************/
.medium-table table {
font-size: 2rem; }
.medium-table td code {
font-size: 1.6rem; }
.small-table table {
font-size: 1.4rem; }
.small-table td code {
font-size: 1.2rem; }
/*********************************************
* Custom size for code
*********************************************/
.medium-code pre {
line-height: 1.1em;
font-size: 1.2rem; }
.small-code pre {
line-height: 1.0em;
font-size: 1rem; }
/*********************************************
* Logo and footer
*********************************************/
.logo {
position: absolute;
top: 2.5rem;
right: 1rem;
width: 10%;
}
.footer {
position: absolute;
bottom: 0.2rem;
left: 0;
margin: 0.2rem;
padding: 0.2rem;
font-size: 0.8rem;
color: #fff;
background-color: #999999;
}
.nologo-slide .logo {
display:none; }
/*********************************************
* Display ordered list in cheat-sheet style
*********************************************/
.cheat-sheet ol {
width: 100%;
list-style-type: disc;
list-style: none;
}

287
Pepiniere/ansible/Formation/revealjs/css/theme/simple.css

@ -1,287 +0,0 @@
/**
* A simple theme for reveal.js presentations, similar
* to the default theme. The accent color is darkblue.
*
* This theme is Copyright (C) 2012 Owen Versteeg, https://github.com/StereotypicalApps. It is MIT licensed.
* reveal.js is Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
*/
@import url(https://fonts.googleapis.com/css?family=News+Cycle:400,700);
@import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);
/*********************************************
* GLOBAL STYLES
*********************************************/
body {
background: #fff;
background-color: #fff; }
.reveal {
font-family: "Lato", sans-serif;
font-size: 36px;
font-weight: normal;
color: #000; }
::selection {
color: #fff;
background: rgba(0, 0, 0, 0.99);
text-shadow: none; }
.reveal .slides > section,
.reveal .slides > section > section {
line-height: 1.3;
font-weight: inherit; }
/*********************************************
* HEADERS
*********************************************/
.reveal h1,
.reveal h2,
.reveal h3,
.reveal h4,
.reveal h5,
.reveal h6 {
margin: 0 0 20px 0;
color: #000;
font-family: "News Cycle", Impact, sans-serif;
font-weight: normal;
line-height: 1.2;
letter-spacing: normal;
text-transform: none;
text-shadow: none;
word-wrap: break-word; }
.reveal h1 {
font-size: 3.77em; }
.reveal h2 {
font-size: 2.11em; }
.reveal h3 {
font-size: 1.55em; }
.reveal h4 {
font-size: 1em; }
.reveal h1 {
text-shadow: none; }
/*********************************************
* OTHER
*********************************************/
.reveal p {
margin: 20px 0;
line-height: 1.3; }
/* Ensure certain elements are never larger than the slide itself */
.reveal img,
.reveal video,
.reveal iframe {
max-width: 95%;
max-height: 95%; }
.reveal strong,
.reveal b {
font-weight: bold; }
.reveal em {
font-style: italic; }
.reveal ol,
.reveal dl,
.reveal ul {
display: inline-block;
text-align: left;
margin: 0 0 0 1em; }
.reveal ol {
list-style-type: decimal; }
.reveal ul {
list-style-type: disc; }
.reveal ul ul {
list-style-type: square; }
.reveal ul ul ul {
list-style-type: circle; }
.reveal ul ul,
.reveal ul ol,
.reveal ol ol,
.reveal ol ul {
display: block;
margin-left: 40px; }
.reveal dt {
font-weight: bold; }
.reveal dd {
margin-left: 40px; }
.reveal q,
.reveal blockquote {
quotes: none; }
.reveal blockquote {
display: block;
position: relative;
width: 70%;
margin: 20px auto;
padding: 5px;
font-style: italic;
background: rgba(255, 255, 255, 0.05);
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2); }
.reveal blockquote p:first-child,
.reveal blockquote p:last-child {
display: inline-block; }
.reveal q {
font-style: italic; }
.reveal pre {
display: block;
position: relative;
width: 90%;
margin: 20px auto;
text-align: left;
font-size: 0.55em;
font-family: monospace;
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
.reveal code {
font-family: monospace; }
.reveal pre code {
display: block;
padding: 5px;
overflow: auto;
max-height: 400px;
word-wrap: normal; }
.reveal table {
margin: auto;
border-collapse: collapse;
border-spacing: 0; }
.reveal table th {
font-weight: bold; }
.reveal table th,
.reveal table td {
text-align: left;
padding: 0.2em 0.5em 0.2em 0.5em;
border-bottom: 1px solid; }
.reveal table th[align="center"],
.reveal table td[align="center"] {
text-align: center; }
.reveal table th[align="right"],
.reveal table td[align="right"] {
text-align: right; }
.reveal table tbody tr:last-child th,
.reveal table tbody tr:last-child td {
border-bottom: none; }
.reveal sup {
vertical-align: super; }
.reveal sub {
vertical-align: sub; }
.reveal small {
display: inline-block;
font-size: 0.6em;
line-height: 1.2em;
vertical-align: top; }
.reveal small * {
vertical-align: top; }
/*********************************************
* LINKS
*********************************************/
.reveal a {
color: #00008B;
text-decoration: none;
-webkit-transition: color .15s ease;
-moz-transition: color .15s ease;
transition: color .15s ease; }
.reveal a:hover {
color: #0000f1;
text-shadow: none;
border: none; }
.reveal .roll span:after {
color: #fff;
background: #00003f; }
/*********************************************
* IMAGES
*********************************************/
.reveal section img {
margin: 15px 0px;
background: rgba(255, 255, 255, 0.12);
border: 4px solid #000;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15); }
.reveal section img.plain {
border: 0;
box-shadow: none; }
.reveal a img {
-webkit-transition: all .15s linear;
-moz-transition: all .15s linear;
transition: all .15s linear; }
.reveal a:hover img {
background: rgba(255, 255, 255, 0.2);
border-color: #00008B;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); }
/*********************************************
* NAVIGATION CONTROLS
*********************************************/
.reveal .controls .navigate-left,
.reveal .controls .navigate-left.enabled {
border-right-color: #00008B; }
.reveal .controls .navigate-right,