Git Product home page Git Product logo

ansible-apt-test's Introduction

ansible-apt-test

Minimal ansible playbook to test apt with local debs

Since Ansible 1.6. the apt module supports the direct installation of deb packages. This can be useful for packages that you build yourself and you do not want to maintain a local repository.

# Install a .deb package
- apt: deb=/tmp/mypackage.deb

Now if you try to do this for a number of packages you'll get an error

- name: install debs
  apt: deb="/tmp/{{ item }}"
  with_items: debs

results in something like

TASK: [install debs] ********************************************************** 
fatal: [xmlp-test] => failed to parse: 
SUDO-SUCCESS-vezxbadxecppwcnzcahcazlrvcajnbze
Traceback (most recent call last):
  File "/home/eglic/.ansible/tmp/ansible-tmp-1408095944.08-178150558729123/apt", line 1906, in <module>
    main()
  File "/home/eglic/.ansible/tmp/ansible-tmp-1408095944.08-178150558729123/apt", line 523, in main
    force=force_yes, dpkg_options=p['dpkg_options'])
  File "/home/eglic/.ansible/tmp/ansible-tmp-1408095944.08-178150558729123/apt", line 299, in install_deb
    pkg = apt.debfile.DebPackage(deb_file)
  File "/usr/lib/python2.7/dist-packages/apt/debfile.py", line 57, in __init__
    self.open(filename)
  File "/usr/lib/python2.7/dist-packages/apt/debfile.py", line 66, in open
    self._debfile = apt_inst.DebFile(self.filename)
SystemError: E:Could not open file tcolorbox_2.51-5_all.deb - open (2: No such file or directory), E:Unable to determine the file size - fstat (9: Bad file descriptor), E:Read error - read (9: Bad file descriptor)


FATAL: all hosts have already failed -- aborting

To reproduce this problem simply clone this repo and run the playbook with

ansible-playbook -i staging -K test.yml

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.