--- - name: configure servers hosts: all become: true gather_facts: false tasks: - include_vars: "vars.yml" - name: create the user user: name: "" state: present - name: change the hostname hostname: name: "" - name: Create the dirs file: name: "" state: directory with_items: - "" - name: Create the files file: name: "" state: touch with_items: - "" - name: register the vars shell: "ls | wc -l " ignore_errors: yes loop: "" register: "var" - name: print the registered variables debug: msg: "There are files in the directory" loop: ""