Re: [ansible-project] Pass user inputs to bash script via ansible

2023-02-07 Thread 'Rowe, Walter P. (Fed)' via Ansible Project
Your ansible playbook can run the shell command and pass these vars as values on the command line. - shell: "my_script {{ jenkins_var1 }} {{ jenkins_var2 }} {{ jenkins_var3 }}" As I said they come into the playbook as ansible extra_vars. If your survey accepts values for these three vars and yo

Re: [ansible-project] Pass user inputs to bash script via ansible

2023-02-07 Thread Linux Study
But how can we pass this values to bash script on remote server? On Tue, 7 Feb 2023, 18:19 'Rowe, Walter P. (Fed)' via Ansible Project, < ansible-project@googlegroups.com> wrote: > Since you are submitting the job via Jenkins and web services you can use > a survey on the ansible tower workflow t

Re: [ansible-project] Pass user inputs to bash script via ansible

2023-02-07 Thread 'Rowe, Walter P. (Fed)' via Ansible Project
Since you are submitting the job via Jenkins and web services you can use a survey on the ansible tower workflow to define variables. The web services call can supply their values. Ansible Tower will provide these variables to your playbook(s) as extra_vars. Read the ansible tower api docs to se

Re: [ansible-project] Pass user inputs to bash script via ansible

2023-02-07 Thread Lee Thomas Stephen
Hi Abhi, I used https://docs.ansible.com/ansible/latest/collections/ansible/builtin/expect_module.html for a VPN script, I use. --- Lee On Tue, Feb 7, 2023 at 12:06 AM Linux Study wrote: > Hi All, > > Is there way to pass user inputs to bash script via ansible? > > > Regards, > Abhi > > -- > Y

Re: [ansible-project] Pass user inputs to bash script via ansible

2023-02-06 Thread Linux Study
We are executing via jenkins and it will call ansible tower to run playbook... Regards, Abhijit On Tue, 7 Feb 2023, 01:03 'Rowe, Walter P. (Fed)' via Ansible Project, < ansible-project@googlegroups.com> wrote: > How is the ansible playbook being run? command line? ansible automation > platform?

Re: [ansible-project] Pass user inputs to bash script via ansible

2023-02-06 Thread 'Rowe, Walter P. (Fed)' via Ansible Project
How is the ansible playbook being run? command line? ansible automation platform? Walter -- Walter Rowe, Division Chief Infrastructure Services, OISM Mobile: 202.355.4123 On Feb 6, 2023, at 1:35 PM, Linux Study wrote: Hi All, Is there way to pass user inputs to bash script via ansible? Rega

Re: [ansible-project] Pass user inputs to bash script via ansible

2023-02-06 Thread Alex Wanderley
Hi, Take a look at Ansible's "expect" module. It may give what you need... Alex On Mon, Feb 6, 2023 at 11:51 AM Linux Study wrote: > Bash script itself asking some questions. So how can we pass that answer > via ansible? > > Regards, > Abhi > > On Tue, 7 Feb 2023, 00:12 Alex Wanderley, > wrot

Re: [ansible-project] Pass user inputs to bash script via ansible

2023-02-06 Thread Linux Study
Bash script itself asking some questions. So how can we pass that answer via ansible? Regards, Abhi On Tue, 7 Feb 2023, 00:12 Alex Wanderley, wrote: > Hi, > > One possible way would be using "vars_prompt" to request the user's input > and then pass that variable on as a parameter to your script

Re: [ansible-project] Pass user inputs to bash script via ansible

2023-02-06 Thread Alex Wanderley
Hi, One possible way would be using "vars_prompt" to request the user's input and then pass that variable on as a parameter to your script in a "shell/command" task. Alex On Mon, Feb 6, 2023 at 11:36 AM Linux Study wrote: > Hi All, > > Is there way to pass user inputs to bash script via ansibl

[ansible-project] Pass user inputs to bash script via ansible

2023-02-06 Thread Linux Study
Hi All, Is there way to pass user inputs to bash script via ansible? Regards, Abhi -- 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 ansible-project+unsubscr