Skip to content

Commit

Permalink
[AUTO] Deploy PR #126
Browse files Browse the repository at this point in the history
for commit c788eb3
  • Loading branch information
gfaivre committed Dec 8, 2023
1 parent 5ce428f commit 47c9a1a
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 7 deletions.
26 changes: 26 additions & 0 deletions pr/126/blog/cours/ansible/ansible-les-playbooks/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,9 @@ <h2 class="h2--large">Ansible - Les playbooks</h2>
</ol>
</li>
<li class="table-of-contents__item">
<a href="#point-de-progression">Point de progression</a>
</li>
<li class="table-of-contents__item">
<a href="#aller-plus-loin-avec-les-sources">Aller plus loin avec les sources</a>
</li>
</ol>
Expand Down Expand Up @@ -608,12 +611,35 @@ <h4 id="les-handlers" class="anchor-title"><a href="#les-handlers">Les handlers<
<span class="figure__legend">Exécution d'un handler.</span>
</figcaption>
</figure>
<p><strong>À retenir:</strong> Les actions de type <code class="code-inline" id="a4510384236c8e83a0cf3b6d8b987aef">notify</code> sont déclenchées <strong>à la fin de chaque bloc de tâches</strong> d'un « play » donné, elles ne le sont bien évidemment <strong>qu'une seule fois</strong> même si elles sont appelé plusieurs fois.</p>
<p>Il est également possible d'ajouter à un handler une clé <code class="code-inline" id="839d7228b5ccc60e54455093a966b8c2">listen</code> comme ci-dessous, celle-ci indiquant au handler « d'écouter » un thème spécifique permettant de regrouper plusieurs « handlers ».</p>
<pre class="code-multiline language-yaml"><code class="language-yaml" id="3760a33542300664ae88814a2662ba2f"><span class="token key atrule">handlers</span><span class="token punctuation">:</span>
<span class="token punctuation">-</span> <span class="token key atrule">name</span><span class="token punctuation">:</span> restart_nginx
<span class="token key atrule">ansible.builtin.service</span><span class="token punctuation">:</span>
<span class="token key atrule">name</span><span class="token punctuation">:</span> nginx
<span class="token key atrule">state</span><span class="token punctuation">:</span> restarted
<span class="token key atrule">listen</span><span class="token punctuation">:</span> restart_http_stack

<span class="token punctuation">-</span> <span class="token key atrule">name</span><span class="token punctuation">:</span> restart haproxy
<span class="token key atrule">ansible.builtin.service</span><span class="token punctuation">:</span>
<span class="token key atrule">name</span><span class="token punctuation">:</span> haproxy
<span class="token key atrule">state</span><span class="token punctuation">:</span> restarted
<span class="token key atrule">listen</span><span class="token punctuation">:</span> restart_http_stack</code></pre>
<h2 id="point-de-progression" class="anchor-title"><a href="#point-de-progression">Point de progression</a></h2>
<p><strong>Nous savons à présent gérer:</strong></p>
<ul>
<li>L'installation d'un <a href="/blog/cours/ansible/ansible-environnement-cle-en-main">environnement Ansible</a>;</li>
<li>Utiliser l'inventaire</li>
<li>Créer des playbooks</li>
</ul>
<p>Nous pouvons toutefois encore apporter un peu de <strong>dynamisme</strong> à ces premières notions par l'introduction de <a href="/blog/cours/ansible/ansible-les-variables">variables</a> dont nous parlerons dans la suite.</p>
<h2 id="aller-plus-loin-avec-les-sources" class="anchor-title"><a href="#aller-plus-loin-avec-les-sources">Aller plus loin avec les sources</a></h2>
<ul>
<li><a href="https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_intro.html" target="_blank">https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_intro.html</a></li>
<li><a href="https://docs.ansible.com/ansible/2.9/modules/list_of_all_modules.html" target="_blank">https://docs.ansible.com/ansible/2.9/modules/list_of_all_modules.html</a></li>
<li><a href="https://yaml.org/spec/1.2.2/#912-document-markers" target="_blank">https://yaml.org/spec/1.2.2/#912-document-markers</a></li>
<li><a href="https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_privilege_escalation.html" target="_blank">https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_privilege_escalation.html</a></li>
<li><a href="https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_handlers.html#handlers" target="_blank">https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_handlers.html#handlers</a></li>
</ul></body>
</main>
<div class="article-footer" data-aos="fade-in">
Expand Down
2 changes: 1 addition & 1 deletion pr/126/blog/rss.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<description>Découvrez nos articles techniques (ou non), rédigés par les membres de l'équipe Rix !</description>
<copyright>Rix - L’utilisation des flux RSS de rix.fr est réservée à un usage strictement personnel, non professionnel et non collectif. Toute autre exploitation doit faire l’objet d’une autorisation et donner lieu au versement d’une rémunération. Contact : [email protected]</copyright>
<link>https://rix-fr.github.io/rix/pr/126/blog</link>
<pubDate>Thu, 07 Dec 2023 16:08:08 +0000</pubDate>
<pubDate>Fri, 08 Dec 2023 11:34:16 +0000</pubDate>
<language>fr</language>
<image>
<url>https://rix-fr.github.io/rix/pr/126/apple-touch-icon.png</url>
Expand Down
12 changes: 6 additions & 6 deletions pr/126/sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,27 @@
</url>
<url>
<loc>https://rix-fr.github.io/rix/pr/126/</loc>
<lastmod>2023-12-07T16:08:08+00:00</lastmod> <changefreq>monthly</changefreq>
<lastmod>2023-12-08T11:34:16+00:00</lastmod> <changefreq>monthly</changefreq>
</url>
<url>
<loc>https://rix-fr.github.io/rix/pr/126/a-propos</loc>
<lastmod>2023-12-07T16:08:08+00:00</lastmod> <changefreq>monthly</changefreq>
<lastmod>2023-12-08T11:34:16+00:00</lastmod> <changefreq>monthly</changefreq>
</url>
<url>
<loc>https://rix-fr.github.io/rix/pr/126/services</loc>
<lastmod>2023-12-07T16:08:08+00:00</lastmod> <changefreq>monthly</changefreq>
<lastmod>2023-12-08T11:34:16+00:00</lastmod> <changefreq>monthly</changefreq>
</url>
<url>
<loc>https://rix-fr.github.io/rix/pr/126/contact</loc>
<lastmod>2023-12-07T16:08:08+00:00</lastmod> <changefreq>monthly</changefreq>
<lastmod>2023-12-08T11:34:16+00:00</lastmod> <changefreq>monthly</changefreq>
</url>
<url>
<loc>https://rix-fr.github.io/rix/pr/126/legal</loc>
<lastmod>2023-12-07T16:08:08+00:00</lastmod> <changefreq>monthly</changefreq>
<lastmod>2023-12-08T11:34:16+00:00</lastmod> <changefreq>monthly</changefreq>
</url>
<url>
<loc>https://rix-fr.github.io/rix/pr/126/confidentialite</loc>
<lastmod>2023-12-07T16:08:08+00:00</lastmod> <changefreq>monthly</changefreq>
<lastmod>2023-12-08T11:34:16+00:00</lastmod> <changefreq>monthly</changefreq>
</url>
<url>
<loc>https://rix-fr.github.io/rix/pr/126/blog/cours/ansible/ansible-les-playbooks</loc>
Expand Down

0 comments on commit 47c9a1a

Please sign in to comment.