I think you just need the '-y' switch. yum -y downgrade <rpm_name>
On Tue, Jul 16, 2019 at 11:04 PM Rahul Kumar <[email protected]> wrote: > > This is the playbook. > --- > - hosts: localhost > tasks: > - name: Install specific version of a package in Ansible. > command: yum downgrade <rpm_name> > > Task is stuck at this point of time, however all other yum commands such as > (yum info <rpmname> etc. ) are working fine in command module. > But if i try same command 'yum downgrade <rpm_name>' manually , it works. > > On Wednesday, 17 July 2019 11:27:38 UTC+5:30, Dick Visser wrote: >> >> On Wed, 17 Jul 2019 at 07:36, Rahul Kumar <[email protected]> wrote: >>> >>> I am using Ansible command module to downgrade the package (assuming higher >>> version is already installed and >>> repo has both lower and higher version). I dont want to use Anisble yum >>> module due to some constraints. >>> I am not able to invoke yum downgrade <rpmname> from command module. >> >> >> What does this mean? >> Did you get an error message? >> Or did the task run OK but the package wasn’t downgraded? >> Without knowing what you did it’s impossible to help. So please show the >> task. >> >> You should be able to invoke any command using the command module. >> >> Dick >> >> >>> -- >>> 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/446ee6a4-519d-4711-87e1-be3ea35a09e0%40googlegroups.com. >>> For more options, visit https://groups.google.com/d/optout. >> >> -- >> Sent from a mobile device - please excuse the brevity, spelling and >> punctuation. > > -- > 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/172d66ef-3633-4117-af54-4443a9c0c899%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- 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/CAH4rTPtKNJbhcODCfn_EezwNFqSviH2_NN%3DO1xTpjuseW%2B%2BZBw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
