Unable to install through dpkg in Ansible

23 views
Skip to first unread message

Bishwajit Samanta

unread,
May 5, 2018, 1:22:08 PM5/5/18
to Ansible Project
Hi, 

I am trying to install a .deb Package through Ansible, it is not getting installed. 

Error:-
----------

TASK [recon_app : Install the Deb Package of ReconApp] *******************************************************
Saturday 05 May 2018  18:34:02 +0530 (0:00:00.034)       0:00:00.034 **********
fatal: [192.168.56.124]: FAILED! => {"changed": false, "msg": "No package matching '/home/bishwajit/RECONAPP_1.0.0-26719-g5defc4d/reconapp_config_1.0.0-26719-g5defc4d_amd64.deb' is available"}

But the Package is there ::-
--------------------------------------

-rw-r--r--  1 bishwajit bishwajit        39 Mar 14 00:44 product-build.info
-rw-r--r--  1 bishwajit bishwajit    253750 Mar 14 00:45 reconapp_config_1.0.0-26719-g5defc4d_amd64.deb
-rw-rw-r--  1 bishwajit bishwajit 216942631 Mar 14 00:46 reconcapp_karaf_1.0.0-26719-g5defc4d.tar.gz
-rw-rw-r--  1 bishwajit bishwajit   1733969 Mar 14 00:46 scripts_1.0.0-26719-g5defc4d.zip

bishwajit@Ansible-deploy-04:~/RECONAPP_1.0.0-26719-g5defc4d$ dpkg -i reconapp_config_1.0.0-26719-g5defc4d_amd64.deb
dpkg: error: requested operation requires superuser privilege

What i found is it is asking for sudo priviledge so i changed the parameters to become, but still it is not getting resolved.


- name: Install the Deb Package of ReconApp
  apt:
    name: "'/home/bishwajit/RECONAPP_1.0.0-26719-g5defc4d/reconapp_config_1.0.0-26719-g5defc4d_amd64.deb"
    install_recommends: yes
    state: present
  become: yes
  
Can anyone help me ?


Richard Hector

unread,
May 9, 2018, 9:03:51 AM5/9/18
to ansible...@googlegroups.com
I think that 'name' expects just a package name, to install from a repo.
try 'deb' for installing from a file on the remote machine.

Richard

Reply all
Reply to author
Forward
0 new messages