Variables

Ansible variables are wrapped between double curly braces.

See all the available default variables –> ansible -m setup hostname

  • Variables can be registered statically into the yml file:
    • vars:
      • example_var: “This is a variable example”
      • my_deb_file: zabbix-release_4.4-1+bionic_all.deb
  • Variables can come as parameter from command line
    • ansible-playbook xxxxx.yml –extra-vars “variable=value”