Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using pause (+ promt) ansible module in a bundle #808

Open
vbp1 opened this issue Mar 25, 2021 · 4 comments
Open

Using pause (+ promt) ansible module in a bundle #808

vbp1 opened this issue Mar 25, 2021 · 4 comments

Comments

@vbp1
Copy link

vbp1 commented Mar 25, 2021

AFAIK it's not possible to use ansible code like below in a bundle:

- pause:
    prompt: > 
          "There is a backup instance with different database system identifier already exists in 
             {{ pgbackup_path + '/backups/' + instance_name + '/' }} at host {{ pghost }} . 
             Should I delete it [y/N]?"
    echo: yes
  register: rm_backup_instance
  when: pg_backup_instance_status.stat.exists and sysid_is_different
@acmnu
Copy link
Member

acmnu commented Apr 4, 2021

Yep, there is no way to stop execution of playbook.

@vbp1
Copy link
Author

vbp1 commented Apr 7, 2021

Yep, there is no way to stop execution of playbook.

Do you have any plans to add that functionality?

@acmnu
Copy link
Member

acmnu commented Apr 8, 2021

No we have no plans like this. It can be done in the way of calling "pause" because of handling stdin could be a pain. We had some talks about making pauses and question as a steps in multijob.

@vbp1
Copy link
Author

vbp1 commented Apr 12, 2021

You could define ansible module, smth like adcm_askuser.
Called from a play, it could have some options, for example: msg_title, msg_text and description of the query (checklist or string value), show msg to user via adcm web interface, get user's answer and return it to the play.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants