Variables or Vars are used to store the data which is further used by ansible playbook. These variables can either take input from user or it can also be stored in YAML or INI file as well like main.yml or inventory. Variables stored in either playbook or in separate YAML or INI format file can…