1.Variablen in vars.yml File ablegen

---
a: aaa
b: bbb

2. encrypt file (Passwort merken !)

ansible-vault encrypt vars.yml

3.Variablen in Playbook verwenden

- hosts: local
  tasks:
    - name: show vars
      include_vars: "vars.yml"
    - debug: msg="{{ a }} / {{ b }}"
ansible-playbook test_vars.yml -l local -i ./hosts_experiments.ini --ask-vault-pass

4. Playbook verwenden (Passwort wird gefragt)