Giter Club home page Giter Club logo

default-test-container's Introduction

default-test-container

Container used by ansible-test for distribution independent tests of collections.

default-test-container's People

Contributors

akasurde avatar goneri avatar jborean93 avatar mattclay avatar relrod avatar s-hertel avatar samdoran avatar webknjaz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

default-test-container's Issues

Can't use package / apt module successfully after default python version was set to 3.9

Re: 015ba65

The community.hashi_vault collection runs its integration tests for its lookup plugin via the default container, running against all supported versions of Python.

As part of the set up for the integration tests, the package module is used to install the unzip and tinyproxy packages:

This had already been failing when the collection was created except when the --python option on ansible-test happened to match the system version of python in the container. But the workaround you see above was used to override the interpreter for these tasks:

  vars:
    ansible_python_interpreter: "{{
      '/usr/bin/python3' if ansible_distribution in ['Ubuntu', 'Debian'] else ansible_python.executable
    }}"

That had been working up until the recent change to default to python 3.9.

The error message returned is similar to what would be expected when using the wrong python version: a warning about it trying to install python3-apt and then an error message when that failed:

python3-apt must be installed and visible from /usr/bin/python3`

Things I tried:

  • Setting ansible_python_interpreter to python3.6 or to /usr/bin/python3.6:
    • to my surprise, it didn't work. Error updated to python3-apt must be installed and visible from /usr/bin/python3.6
  • Updating runme.sh to reset the symlink, via: ln -s python3.6 /usr/bin/python3 -f
    • this did work, of course modifying the environment meant the test run failed in the end, but it seems something is really tied to /usr/bin/python3 being 3.6.

For now I think I'm going to pin to ansible-test-container:3.2.2 so that my CI is working, but it's not really a long term solution.

Something doesn't seem to be working properly when explicitly overriding the python interpreter, but I can't fully tell where it is. If I should be submitting this elsewhere, please let me know.

Unable to utilize json_query

I believe this container is missing the jmespath library, which is a requirement for using the json_query Ansible filter.

The following task:

- name: Test json_query
      ansible.builtin.debug:
      msg: "{{ '' | community.general.json_query('*') }}"

Results in the following error:

fatal: [testhost]: FAILED! => {"msg": "You need to install \"jmespath\" prior to running json_query filter"}

Link to jmespath:
https://pypi.org/project/jmespath/

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.