You received this message because you are subscribed to the Google Groups "Ansible Development" group. To unsubscribe from this group and stop receiving ...
09.05.2017 · I am trying to write an ansible playbook which installs some RPMs for me after they have been copied to a known location by a Jenkins job. The problem is, I'm not sure how to get the name of the RPM to install without hard coding it.
Ansible yum module already provides a solution for this problem. The path to the local rpm file on the server can be passed to the name parameter. From the Ansible yum module documentation: You can also pass a url or a local path to a rpm file.
The role that is called in this example handles the yum install part: - name: Install RPMs yum: name={{item}} state=present with_items: - "{{ artifacts }}".
Ansible yum module already provides a solution for this problem. The path to the local rpm file on the server can be passed to the name parameter. From the Ansible yum module documentation: You can also pass a url or a local path to a rpm file.
English Use the command yum localinstall /path/to/file.rpm. This command will install the local rpm file as well as searching for required rpms (dependencies, etc) on RHN or other repositories that are configured and install it for the user. Raw yum localinstall /path/to/file.rpm ... Subscriber exclusive content
15.08.2017 · I have to install dozen of rpms located in a specific directory using ansible. Right now I'm using the syntax like: - name: install uploaded rpms command: rpm -ivh /tmp/*.rpm I want to do it using yum module, but don't know, how to tell it to install all rpms in a directory (not to specify name of each file). Any suggestions? Thanks in advance
Solution 1: Ansible yum module already provides a solution for this problem. The path to the local rpm file on the server can be passed to the name ...
This module supports yum (as it always has), this is known as yum3 / YUM3 / yum-deprecated by upstream yum developers. As of Ansible 2.7+, this module also supports YUM4, which is the "new yum" and it has an dnf backend. By default, this module will select the backend based on the ansible_pkg_mgr fact. validate_certs.