On 23.10.2019 21:40, john 517501 wrote:
I have simple playbook where trying to install the Debian packages
downloaded locally in my server. This playbook runs on localhost and
install the Debian packages in the same system. But this playbook gives
an
error *"Dependency is not satisfiable* for some of the packages even
tough
the dependency package is available in the local repository.
Sometimes the best solution is to use the commands.
*install_dependencies.yml*
---
- hosts: localhost
vars:
remote_media_directory: "/home/local_repository"
become: yes
tasks:
- name: find all debian Packages
find:
paths:
- "{{ remote_media_directory }}"
file_type: file
recurse: yes
use_regex: yes
patterns:
- '.*deb$'
register: files_matched_subdirectory
- name: installation debian packages
apt:
deb: "{{ item.path }}"
with_items: "{{ files_matched_subdirectory.files }}"
when: ansible_distribution == "Ubuntu"
Both tasks can be replaced by this
- command: dpkg -iR {{ remote_media_directory }}
--
Kai Stian Olstad
--
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...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/fc0a1b1e61f48a82692cc5528668c67f%40olstad.com.