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. To operate on several packages this can accept a comma separated list of packages or (as of 2.0) a list of packages.
1 Answer1. There is no need to do this. The yum module is optimized for loops to install all items in one go. When used with a loop of package names in a playbook, ansible optimizes the call to the yum module. Instead of calling the module with a single package each time through the loop, ansible calls the module once with all of the package ...
Aug 16, 2017 · @Jontia reads the register variable rpm_files, gets the .files property from that object, pipes that value to a map function that extracts the .path property from each rpm "files" object (returned from the ansible find module), and concatenates each item into a list. it's a jinja template that sets the value of rpm_list
From the Ansible yum module documentation: You can also pass a url or a local path to a rpm file. To operate on several packages this can accept a comma ...
Install rpm package using Ansible. 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 parameter. ... Here's what I do to install multiple RPMs from the source machine:
The task could end up with a set of packages that does not match the complete list of specified packages to install (because dependencies between the ...
To operate on several packages this can accept a comma separated list of packages or (as of 2.0) a list of packages. The proper steps to do this would be something like this: - name: Copy rpm file to server copy: src: package.rpm dest: /tmp/package.rpm - name: Install package. yum: name: /tmp/package.rpm state: present.
26.10.2017 · 2) a loop of all the packages that you would like to install using yum module. - name: Install multiple rpm packages with its dependencies yum: name: " { { item }}" state: present loop: - rpm_package_dependency_1 (need not mention .rpm extension here) - rpm_package_dependency_2 - rpm_package_1 - rpm_package_2. Share.
Install multiple rpm file at once on ansible So, I want to install some rpm package where it has dependencies between each other. I didnt use loop because it will not work.
To operate on several packages this can accept a comma separated list of packages or (as of 2.0) a list of packages. The proper steps to do this would be something like this: - name: Copy rpm file to server copy: src: package.rpm dest: /tmp/package.rpm - name: Install package. yum: name: /tmp/package.rpm state: present. Share.
Install multiple rpm file at once on ansible. Close. 4. Posted by 4 months ago. Install multiple rpm file at once on ansible. So, I want to install some rpm package where it has dependencies between each other. I didnt use loop because it will not work. So, I create below task: