Im a newbie to ansible, and im trying to write an ansible script which would continuously prompt user to insert data and use the data to perform some tasks until the user decides to end the loop, a shell script serving the same purpose would look like this.
read -s -p "Create new directory? y/n: " response while [[ "$response" == "y" ]] do read -s -p "Enter the name of direcory: " name mkdir $name if [ $? -ne 0 ] then echo "Failed to create new directory $name" exit 1 fi read -s -p "Create another new directory? y/n: " response done so how do i go about this? -- 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 post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/d850aaed-3fbf-4d3f-a877-87a3c879afee%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
