From 8936548f41268274aa5fbad06149f1e707343ef0 Mon Sep 17 00:00:00 2001 From: Lukas Grimm Date: Fri, 6 Dec 2024 09:42:15 +0100 Subject: [PATCH] fix slides --- slides/ansible-techlab/puzzle-demo.md | 43 +++++++++++++-------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/slides/ansible-techlab/puzzle-demo.md b/slides/ansible-techlab/puzzle-demo.md index 7e2fead..8320cc0 100644 --- a/slides/ansible-techlab/puzzle-demo.md +++ b/slides/ansible-techlab/puzzle-demo.md @@ -2,11 +2,11 @@ ### ansible.puzzle.ch - +#### Lukas Grimm -#### Lukas Preisig + @@ -16,7 +16,7 @@ -#### Florian Studer + @@ -27,7 +27,7 @@ - - + - + *** ## Alle Puzzler -
-
-
-
+![](https://www.puzzle.ch/img/2024/06/2024_Gruppenfoto_Puzzle-16x9-1000px-Breit.jpg?w=1000&h=561&fit=crop&fm=webp&q=90&sharp=4&s=5ec79746d78173920f663ca911d9ce86)" ### Members https://www.puzzle.ch/de/team -
- *** @@ -783,6 +772,7 @@ Ein Play ist was, wo wie, gmacht wird "Baby-JSON" possible same as before: + ```yaml --- - hosts: web @@ -790,6 +780,7 @@ same as before: - name: install httpd yum: name=httpd state=installed ``` + Not Best Practice! @@ -848,6 +839,7 @@ Why? Where to define variables? *** ## Where to put variables defined in playbook: + ```yaml --- - hosts: web @@ -860,12 +852,14 @@ defined in playbook: name: "{{ my_package }}" state: installed ``` + *** ## Where to put variables `ansible-playbook myplay.yml --extra-vars my_package="nginx"` + Note: @@ -933,6 +927,7 @@ https://docs.ansible.com/ansible/latest/user_guide/playbooks_variables.html#unde Don't Name your Variables after Magic Variables *** + ## Bonus Level: Loops! ```yaml - name: start and enable two services @@ -951,11 +946,15 @@ Note: https://docs.ansible.com/ansible/latest/user_guide/playbooks_loops.html#migrating-to-loop + *** + # Lab 4.1: Ansible Playbooks - Variables and Loops + *** + ## Templates - "template" is a module