Hi

Somewhere halfway through one of our playbooks there is a 'pause' task that
prompts for input:

- name: Database restoration - timestamp selection
  pause:
    prompt: |
      Select the number of a backup date to restore from:

        {% for ts in backup_timestamps_available %}
        {{ (loop.index|string).ljust(8) ~ '%Y-%m-%d (%A) %H:%M:%S' |
strftime(ts) }}
        {% endfor %}
    echo: true
  register: ts_select
  when: db_restore


But in some scenarios this playbook is being run from a shell wrapper,
which can be non-interactive, in which case this step will bail with:

*[WARNING]: Not waiting for response to prompt as stdin is not interactive*


I'd like to gracefully stop right at the beginning when db_restore is set
but the play is not run interactively.
I can check in the shell wrapper, but that doens't know about ansible extra
vars.

Is there a way to check in the playbook for interactiveness?


thx



-- 
Dick Visser
Trust & Identity Service Operations Manager
GÉANT

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAL8fbwO_DEC_LYcFFMdyqxzNiXMjJgPzaSJsrKJ03Oi9v_R8Gw%40mail.gmail.com.

Reply via email to