User prompts in Ansible

Uses prompts and when modules:

In your playbook:

 vars_prompt:
name: "create_domains"
prompt: "Do you want to create domains? (type YES to create)"
default: "NO"

In the task

- digital_ocean_domain: >
  state=present
  name={{item}}.{{www_tld}}
  ip={{ do_droplet.droplet.ip_address }}
  api_token={{ do_token }}
 # id={{ do_droplet.droplet.id }}
with_items: "{{ domains }}"
when: create_domains == "YES"