Linux - ContainersThis forum is for the discussion of all topics relating to Linux containers. Docker, LXC, LXD, runC, containerd, CoreOS, Kubernetes, Mesos, rkt, and all other Linux container platforms are welcome.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am looking for some help with regex generator, as ansible uses python regex. Is there any way that i could generate it on online.
I also wanted the ansible to prompt for interactions(questions) when running a particular task and below is my code. ERROR! conflicting action statements: command, prompt
Looking for some suggestions.
Hi all,
I am looking for some help with regex generator, as ansible uses python regex. Is there any way that i could generate it on online.
Maybe, so you should probably do a search for this and find it, rather than asking us to look it up for you.
Quote:
I also wanted the ansible to prompt for interactions(questions) when running a particular task and below is my code. ERROR! conflicting action statements: command, prompt
Looking for some suggestions.
As written, your question is hard to figure out. Do you GET that error message?? What are you actually trying to do? And posting 5 lines of an entire Ansible playbook doesn't give anyone much to work with. You've been working with Ansible for a few years now...have you referenced their docs? https://www.linuxquestions.org/quest...le-4175712393/
Post a clear question with clear errors/messages, and we can try to help.
Maybe, so you should probably do a search for this and find it, rather than asking us to look it up for you.
As written, your question is hard to figure out. Do you GET that error message?? What are you actually trying to do? And posting 5 lines of an entire Ansible playbook doesn't give anyone much to work with. You've been working with Ansible for a few years now...have you referenced their docs? https://www.linuxquestions.org/quest...le-4175712393/
Post a clear question with clear errors/messages, and we can try to help.
well working with ansible should not mean that i should have knowledge on all topics. I am looking for some interactive prompts. I have referenced the docs and seems they donot have option using both shell and prompt at a time. hence i am asking here for the same if anyone has tried it.
Or it’s easier to do it with bash .. and then call script via ansible.
well working with ansible should not mean that i should have knowledge on all topics. I am looking for some interactive prompts. I have referenced the docs and seems they donot have option using both shell and prompt at a time. hence i am asking here for the same if anyone has tried it. Or it’s easier to do it with bash .. and then call script via ansible.
And you couldn't find it?? Even after two years experience with Ansible?
hello first stop critzing people. also read the question or my answer given. everytime i post something you always wanted me to say something which is not fair. And you dont have to talk to me regarding my experience.
hello first stop critzing people. also read the question or my answer given. everytime i post something you always wanted me to say something which is not fair. And you dont have to talk to me regarding my experience.
You claim to have referenced the docs, and couldn't find anything...yet just putting "ansible interactive prompt" into any search-engine pulls up the ansible docs, with the page you were handed. You can't say you read the docs when the answer to exactly what you're asking is IN those documents.
Your question was read, and you asked how to get an ansible playbook to ask questions/prompt users. You have been working with ansible for a good while, and claimed to have looked for solutions in the documentation, and the answer to your question was in what you claimed to look at. Which is how to get interactive prompts. You were also asked to clarify things, since (again) your question was unclear. Not sure how python or regex fits into any of this, when you can use ansible native to prompt users for things, but you never clarified.
So, read the docs and follow them. Use your knowledge and experience.
Look, 1s440. We don't mean to give you a hard time. It's just that no-one can tell what you're actually asking for.
Agreed, and this pattern often repeats. The OP seems to ask about how to make an ansible playbook that has interactive prompts, which is documented/supported by ansible. They were given a link to the documentation (which they said they read, and didn't see anything about it). They have the instructions, and at least two years experience with ansible...hard to know why they can't apply what's documented to give them what they want.
Agreed, and this pattern often repeats. The OP seems to ask about how to make an ansible playbook that has interactive prompts, which is documented/supported by ansible. They were given a link to the documentation (which they said they read, and didn't see anything about it). They have the instructions, and at least two years experience with ansible...hard to know why they can't apply what's documented to give them what they want.
I clearly quoted "command " and "prompt" together doesn't work. In the ansible documentation they dont have option to use "command" but just prompting questions and answer.
I know this is possible using expect module but expect module doesnot have interactions. Hence asked for help here. If my question is not clear, better you can tell me to explain clearly and you donot have to point me regarding my experience again and again.
And its clear ansible doesnot have option like this hence closing this case
I clearly quoted "command " and "prompt" together doesn't work. In the ansible documentation they dont have option to use "command" but just prompting questions and answer.
I know this is possible using expect module but expect module doesnot have interactions. Hence asked for help here. If my question is not clear, better you can tell me to explain clearly and you donot have to point me regarding my experience again and again. And its clear ansible doesnot have option like this hence closing this case
No, it's clear you haven't done much research, since (again) it's covered in the Ansible docs, which someone with experience should know to reference first. And this is the same clear question you were asked to provide in post #2, since none of us could figure out what you were asking.
It's just a matter of breaking your playbook up into the correct sections. You prompt for input and shove it into variables, then you take those variables and use them in a task.
It's just a matter of breaking your playbook up into the correct sections. You prompt for input and shove it into variables, then you take those variables and use them in a task.
It's just a matter of breaking your playbook up into the correct sections. You prompt for input and shove it into variables, then you take those variables and use them in a task.
Unfortunately vars_prompt doesn’t work in my case. The vars_prompt questions are basically from installer.run file. When I run install.run file on remote hosts there were questions being asked which user has to answer. So I used expect module but with expect module It answers up to 3 questions and then I get „Installation aborted by user“
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.