title: vars_prompt not working in role - Ansible
body: <p>I'm trying to automate hostname creation  for 10x machines using ansible roles. What I want when executing playbook, as this wait for enter the user name manually. </p>
  
  <p>I tried with vars_prompt module for satisfying the requirement. But here for a single *.yml file, I'm able to see the expected results </p>
  
  <p>Without role - I can see the input is taken to variable host. but this works fine. </p>
  
  <pre><code>#host.yml . 
  ---
  - hosts: ubuntu
    user: test
    sudo: yes
    vars_prompt:
      - name: host
        prompt: "Specify host name?"
        private: no
  
    tasks: 
      - debug:
          msg: ' log as {{ host }}'
      - name: Changing hostname 
        hostname:
          name: '{{ host }}'
  </code></pre>
  
  <h1>With role, &lt; this is not working >  { vars_prompt not working }</h1>
  
  <pre><code>#role.yml
  ---
  - hosts: ubuntu
    user: test
    sudo: yes
    roles:
  #    - hostname
  
  </code></pre>
  
  <pre><code>#hostname/tasks/main.yml
  - name: testing prompt 
    vars_prompt: 
      - name: host
        prompt: "Specify host name?"
  
  - name: Ansible  prompt example
    debug:
      msg: "{{ host }}"
  
  #Changing hostname
  - name: Changing hostname
    hostname:
    name: "{{ host }}"
  </code></pre>
  
  <p>Here I'm getting error as </p>
  
  <pre><code>ERROR! no action detected in task. This often indicates a misspelled module name, or incorrect module path.
  
  The error appears to have been in '/root/roles/hostname/tasks/main.yml': line 1, column 3, but may
  be elsewhere in the file depending on the exact syntax problem.
  
  The offending line appears to be:
  
  - name: testing prompt
    ^ here
  </code></pre>
  
  <p>My expectation is to set some parameters need to set manually as input while the execution of playbook. Need to work this vars_prompt module in role.</p>