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

# http://docs.ansible.com/ansible/intro_inventory.html

[all:vars]
#host_key_checking=false
ansible_ssh_common_args='-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
#information_environment=dev
#information_product=prod1
#ansible_ssh_user=ubuntu
#ansible_ssh_pass=pass1234
#ansible_user=root

[example.com]
www.example.com
db.example.com



[all:children]
local
example.com

[local:children]
phy.local
vm.local

[phy:children]
phy.local
phy.example.com

[phy.local]
www.local
db.local
backup.local
lxc.local ansible_host=192.168.1.11

Order hosts in playbook
https://docs.ansible.com/ansible/latest/user_guide/playbooks_intro.html#hosts-and-users
inventory: The default. The order is ‘as provided’ by the inventory
reverse_inventory: As the name implies, this reverses the order ‘as provided’ by the inventory
sorted: Hosts are alphabetically sorted by name
reverse_sorted: Hosts are sorted by name in reverse alphabetical order
shuffle: Hosts are randomly ordered each run

# Ansible 2.2
- hosts: "{{ ansible_play_hosts | sort() }}"

# Ansible >2.4
- hosts: all
  order: sorted
  tasks:
    - debug:
        var: inventory_hostname

Links
https://docs.ansible.com/ansible/2.4/intro_configuration.html#inventory

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