Skip to main content

Primary links

  • Home
  • AI
  • Kubernetes
  • Incus
  • Ansible
  • Terraform
  • OpenStack
  • Virtualization
  • Linux
  • SmartHome
  • HowTo

Misc

  • Linux
  • Hardware
  • Programming
  • Databases
  • Multimedia
  • Windows

Cloud

  • OpenStack
  • cloud-config
  • nextcloud

Virtualization

  • Virtualization
  • Incus
  • Docker
  • KVM
  • Kubernetes
  • LXC
  • LXD
  • QEMU
  • VMware
  • VirtualBox
  • multipass
  • podman
  • vagrant
  • XEN

Network

  • DNS
  • Firewall
  • Linux
  • OpenvSwitch
  • SSL
  • VLAN
  • VPN
  • iPXE
  • namespaces
  • nmcli
  • tcpdump

Storage

  • CEPH
  • DRBD
  • LVM
  • S3
  • ZFS
  • btrfs

Automation / CI/CD

  • Install
  • Ansible
    • Ansible Redfish
    • Ansible
    • CLI
    • Install
    • Inventory
    • Inventroy report
    • Playbooks
    • ansible-galaxy
    • collection
    • hosts
    • rundeck-ansible-plugin
    • snippets
    • templates
  • GitLab
  • LLM
  • Preseed
  • Puppet
  • Terraform
  • Ubuntu autoinstall

Monitoring / Visualisation

  • Grafana
  • Icinga
  • Prometheus
  • Monitoring
  • ELK
  • mermaid
  • ansible
{% for host in groups['db_servers'] %}
   {{ host }}
   {{ hostvars[host]['ansible_eth0']['ipv4']['address'] }}
{% endfor %}

{% elif  student.department.upper() != "MATHS DEPARTMENT" %}
    Maths department
{% endif %}

# generate SSH config
{% for host in groups['vm.example.com'] %}
Host {{ host }}
  Hostname {{ hostvars[host]['ansible_eth0']['ipv4']['address'] }}
{% endfor %}

{% for host in groups['all'] %}
  "{{ host }}"{% if not loop.last %},{% endif %}
{% endfor %}

# value by group (condition)
{% if 'www' in group_names and ansible_fqdn in groups['www'] %}
foo=true
{% else %}
foo=false
{% endif %}

{% if 'index.html' in request.build_absolute_uri %}
    hello
{% else %}
    bye
{% endif %}

{% if grains['os'] == 'Fedora' -%}
mailq_path = /usr/bin/mailq.postfix
{% elif grains['os'] == 'Arch' -%}
mailq_path = /usr/bin/mailq
{-% endif %}

{% if os_env == "stage" and 'control-node' in inventory_hostname %}
    storage-extern:
      id: 1234
{% endif %}

{% if ( (foo == 'foo' or bar == 'bar') and (fooo == 'fooo' or baar == 'baar') ) %}
 ...
{% endif %}
{% set keystone_cmd = 'apache2' if kolla_base_distro in ['ubuntu', 'debian'] else 'httpd' %}
{% set keystone_dir = 'apache2/conf-enabled' if kolla_base_distro in ['ubuntu', 'debian'] else 'httpd/conf.d' %}
{
    "command": "/usr/sbin/{{ keystone_cmd }}",

Links
http://jinja.pocoo.org/docs/dev/templates/#line-statements

Profiles GitHub StackOverflow LinkedIn Xing
Contact Imprint
© panticz 2026

Cookie-Einstellungen

Diese Website nutzt eingebettete Inhalte von Drittanbietern (z.B. YouTube, SoundCloud). Beim Laden dieser Inhalte werden Daten an die jeweiligen Anbieter übermittelt. Datenverarbeitungserklärung