From e893e3987125a03ef1decaeb47b98e2940bf1802 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20Pr=C3=A9mel-Cabic?= Date: Mon, 8 Jun 2026 11:22:25 +0200 Subject: [PATCH] docs: add Ansible inventory slide (static vs dynamic) + Jinja2 notes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - new slide 26: inventory construction — static YAML vs dynamic OpenStack plugin, with side-by-side examples and notes - renumber subsequent slide markers 26-40 -> 27-41 (now 41 slides) - slide 25: add Jinja2 templating speaker notes Co-Authored-By: Claude Opus 4.8 (1M context) --- index.html | 71 ++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 56 insertions(+), 15 deletions(-) diff --git a/index.html b/index.html index ed5fb9f..29dde79 100644 --- a/index.html +++ b/index.html @@ -1035,11 +1035,52 @@ Apply complete! Resources: 2 added, 0 changed, 0 destroyed.
  • Plain YAML — tasks run top to bottom against the "webservers" group.
  • become: true = run as root (sudo).
  • Handlers are the neat bit: restart nginx only if the config actually changed.
  • +
  • The .j2 in nginx.conf.j2 = Jinja2, Ansible's templating engine. The template module renders it on the control node — {{ variables }}, {% if %}/{% for %} logic, filters like {{ value | default(...) }} — then ships the result to dest.
  • +
  • That's how one template serves many hosts: same file, per-host values from inventory/group_vars.
  • - + +
    +

    Who runs where? The inventory.

    +
      +
    • Static — a hand-written INI/YAML file of hosts & groups. Simple, versioned, ideal for stable fleets.
    • +
    • Dynamic — an inventory plugin queries a source at runtime (OpenStack, AWS, OVHcloud…). Hosts discovered automatically — built for cloud & autoscaling.
    • +
    +
    +
    +

    # inventory.yml — static

    +
    
    +webservers:
    +  hosts:
    +    web-01:
    +      ansible_host: 10.0.0.11
    +    web-02:
    +      ansible_host: 10.0.0.12
    +        
    +
    +
    +

    # openstack.yml — dynamic

    +
    
    +plugin: openstack.cloud.openstack
    +expand_hostvars: true
    +groups:
    +  webservers: "'web' in name"
    +        
    +
    +
    + +
    + +

    $ terminal

    
    @@ -1071,7 +1112,7 @@ finistdevs-web : ok=4  changed=3  unreachable=0  failed=0  skipped=0
         
       
    - +

    Not just configuration. Operations.

      @@ -1089,7 +1130,7 @@ finistdevs-web : ok=4 changed=3 unreachable=0 failed=0 skipped=0
    - +

    The community does the heavy lifting.

      @@ -1106,7 +1147,7 @@ finistdevs-web : ok=4 changed=3 unreachable=0 failed=0 skipped=0
    - +

    Ansible at scale: open-source vs enterprise.

      @@ -1124,7 +1165,7 @@ finistdevs-web : ok=4 changed=3 unreachable=0 failed=0 skipped=0
    - +

    Puppet

    Your servers are configured. Now keep them that way.

    @@ -1137,7 +1178,7 @@ finistdevs-web : ok=4 changed=3 unreachable=0 failed=0 skipped=0
    - +

    What is Puppet?

      @@ -1154,7 +1195,7 @@ finistdevs-web : ok=4 changed=3 unreachable=0 failed=0 skipped=0
    - +

    Pull, not push. Agents, not SSH.

      @@ -1205,7 +1246,7 @@ finistdevs-web : ok=4 changed=3 unreachable=0 failed=0 skipped=0
    - +

    # manifests/webserver.pp

    
    @@ -1235,7 +1276,7 @@ class webserver {
         
       
    - +

    $ terminal

    
    @@ -1262,7 +1303,7 @@ Notice: Applied catalog in 12.34 seconds
         
       
    - +

    Someone SSH'd in and changed something.

      @@ -1310,7 +1351,7 @@ Notice: Applied catalog in 12.34 seconds
    - +

    Puppet: large fleets, zero drift.

      @@ -1328,7 +1369,7 @@ Notice: Applied catalog in 12.34 seconds
    - +

    The ecosystem outlives the company.

      @@ -1345,7 +1386,7 @@ Notice: Applied catalog in 12.34 seconds
    - +

    They're not competing. They're complementary.

    Each solves a different layer of the same problem.

    @@ -1384,7 +1425,7 @@ Notice: Applied catalog in 12.34 seconds
    - +

    A common production setup:

      @@ -1401,7 +1442,7 @@ Notice: Applied catalog in 12.34 seconds
    - +

    Questions?

    Thank you!