It's the same as yum localinstall in that the rpm needs to be present on the remote system. If you have it on the local system, do a copy task first to copy it remotely then use the yum module to install it.
-Toshio 2015-01-14 15:25 GMT-08:00 Jim McMahon <[email protected]>: > With the Ansible yum module, can I install an RPM that is local to the > server that I'm deploying to? In other words, can I do something like this > using ansible, but using the yum module? > > - name: locally install mysql-community-release rpm (configures yum) > sudo: true > shell: yum localinstall ~{{ install_user }}/RPMs/{{ mysql_community_rpm }} > -y > tags: > - mysql-client > > > The yum module gives this example: > > - name: install nginx rpm from a local file > yum: name=/usr/local/src/nginx-release-centos-6-0.el6.ngx.noarch.rpm > state=present > > But is this the same as yum localinstall? Or, does this install an RPM on > the destination that exists on the machine I running ansible-playbook from? > > -- > 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/1c876f1b-f110-4a77-aac3-25387a996d25%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/CAG9juEpOynfPQV3VhQvteZqZLaRTUCHQaOF0N%3DZ5tu9WBeTUvQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
