Using prompt operation

The syntax for the Fabric prompt operation is as follows:

prompt(text, key=None, default='', validate=None)

The user can provide a specific value for the task by using the prompt operation, and the input will be stored inside of a variable and used by tasks. Please note that you will be prompted for each host inside of the fabfile:

def prompt_ops():    prompt("please supply release name", default="7.4.1708")

Get Hands-On Enterprise Automation with Python. now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.