GithubHelp home page GithubHelp logo

ansible-base seems not working about asdf-pyapp HOT 7 CLOSED

amrox avatar amrox commented on July 19, 2024
ansible-base seems not working

from asdf-pyapp.

Comments (7)

iamhsa avatar iamhsa commented on July 19, 2024 1

re-hello @amrox

In fact I have a similar (but not exactly the same) issue on another Linux (ArchLinux).

# uname -a && cat /etc/os-release
Linux 99348e6ad5c6 5.4.139-16311-g330b3df0010b #1 SMP PREEMPT Mon Nov 8 12:23:05 PST 2021 x86_64 GNU/Linux
NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://bugs.archlinux.org/"
LOGO=archlinux-logo
# asdf current
ansible-base    ______          No version set. Run "asdf <global|shell|local> ansible-base <version>"

When I try to install latest ansible I have this output :

# asdf install ansible-base latest
asdf-pyapp: [ERROR] Unable to parse versions for 'ansible-base'
ansible-base  is already installed

But if I use a specific version, it work

asdf install ansible-base 2.10.15
Requirement already satisfied: pip in ./.asdf/installs/ansible-base/2.10.15/venv/lib/python3.9/site-packages (21.2.4)
Collecting pip
  Downloading pip-21.3.1-py3-none-any.whl (1.7 MB)
     |████████████████████████████████| 1.7 MB 4.1 MB/s 
Collecting wheel
  Downloading wheel-0.37.0-py2.py3-none-any.whl (35 kB)
Installing collected packages: wheel, pip
  Attempting uninstall: pip
    Found existing installation: pip 21.2.4
    Uninstalling pip-21.2.4:
      Successfully uninstalled pip-21.2.4
Successfully installed pip-21.3.1 wheel-0.37.0
Collecting ansible-base==2.10.15
  Downloading ansible-base-2.10.15.tar.gz (6.1 MB)

[...]

Installing collected packages: pyparsing, click, userpath, packaging, argcomplete, pipx
Successfully installed argcomplete-1.12.3 click-8.0.3 packaging-21.3 pipx-0.16.3 pyparsing-3.0.6 userpath-1.7.0
# asdf global ansible-base  2.10.15

# ansible --version
ansible 2.10.15
  config file = None
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /root/.asdf/installs/ansible-base/2.10.15/venv/lib/python3.9/site-packages/ansible
  executable location = /root/.asdf/installs/ansible-base/2.10.15/bin/ansible
  python version = 3.9.9 (main, Nov 20 2021, 21:30:06) [GCC 11.1.0]

So this issue occur only with latest keyword

from asdf-pyapp.

iamhsa avatar iamhsa commented on July 19, 2024 1

I am share you two docker command to reproduce this.

This fails :

docker run -e TERM  -w /root -it --rm archlinux bash -uec '
    pacman -Syu --noconfirm git which python python-pip
    git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.8.1
    . $HOME/.asdf/asdf.sh
    asdf plugin add ansible-base https://github.com/amrox/asdf-pyapp.git
    asdf current
    asdf install ansible-base latest'

This does not fail :

docker run -e TERM  -w /root -it --rm archlinux bash -uec '
    pacman -Syu --noconfirm git which python python-pip
    git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.8.1
    . $HOME/.asdf/asdf.sh
    asdf plugin add ansible-base https://github.com/amrox/asdf-pyapp.git
    asdf current
    asdf install ansible-base 2.10.15
    asdf global ansible-base 2.10.15
    ansible --version'

Edit : typo in docker command

from asdf-pyapp.

amrox avatar amrox commented on July 19, 2024 1

@iamhsa that is perfect. I will look into it this weekend

from asdf-pyapp.

iamhsa avatar iamhsa commented on July 19, 2024 1

@amrox : Works great !

❯  asdf list-all  ansible-base
0.0.1a1
0.0.1a2
[...]
2.10.15
2.10.15rc1
2.10.16rc1
❯ asdf install ansible-base latest
Requirement already satisfied: pip in ./.asdf/installs/ansible-base/2.10.15/venv/lib/python3.9/site-packages (21.2.4)
Collecting pip
  Downloading pip-21.3.1-py3-none-any.whl (1.7 MB)
     |████████████████████████████████| 1.7 MB 22.0 MB/s 
Collecting wheel
  Downloading wheel-0.37.0-py2.py3-none-any.whl (35 kB)
Installing collected packages: wheel, pip
  Attempting uninstall: pip
    Found existing installation: pip 21.2.4
    Uninstalling pip-21.2.4:
      Successfully uninstalled pip-21.2.4
Successfully installed pip-21.3.1 wheel-0.37.0
Collecting ansible-base==2.10.15
  Using cached ansible-base-2.10.15.tar.gz (6.1 MB)
  Preparing metadata (setup.py) ... done
[...]
Installing collected packages: pyparsing, click, userpath, packaging, argcomplete, pipx
Successfully installed argcomplete-1.12.3 click-8.0.3 packaging-21.3 pipx-0.16.3 pyparsing-3.0.6 userpath-1.7.0

❯ asdf global ansible-base latest

❯ ansible --version
ansible 2.10.15
  config file = None
  configured module search path = ['/home/hug0/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/hug0/.asdf/installs/ansible-base/2.10.15/venv/lib/python3.9/site-packages/ansible
  executable location = /home/hug0/.asdf/installs/ansible-base/2.10.15/bin/ansible
  python version = 3.9.9 (main, Nov 20 2021, 21:30:06) [GCC 11.1.0]

Thanks a lot for the quick fix!

Edit : change output ansible --version (system version --> asdf ansible version)

from asdf-pyapp.

amrox avatar amrox commented on July 19, 2024

Hi @iamhsa - I'm trying to troubleshoot this.

Can you provide some details about your environment?

OS (uname -a)

Python ($(which python3) --version)

from asdf-pyapp.

iamhsa avatar iamhsa commented on July 19, 2024

Hi @amrox,

I encountered this problem on Gnu/Linux (Debian)... but for now I seem to be working.

Sorry for the noise !

from asdf-pyapp.

amrox avatar amrox commented on July 19, 2024

@iamhsa merged #14 to master. Let me know if that works for you?

from asdf-pyapp.

Related Issues (14)

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.