Closed hongbo-miao closed 1 year ago
Thank you. I'll have a look after the weekend.
Cheers, Bart
On Thu, 3 Aug 2023 at 18:25 Hongbo Miao @.***> wrote:
I am setting up Ubuntu 22.04 by
- name: Install packages hosts: hm-ubuntu roles:
- role: staticdev.pyenv pyenv_version: v2.3.23 pyenv_env: user pyenv_global:
- 3.11.4 pyenv_python_versions:
- 3.11.4
- role: bartdorlandt.poetry vars: virtualenvs_inproject: false virtualenvs_prefer_active_python: false
And got error
TASK [bartdorlandt.poetry : Install Poetry] **** fatal: [hm-ubuntu]: FAILED! => {"changed": true, "cmd": "set -o pipefail && curl -sSL https://install.python-poetry.org | python3 -", "delta": "0:00:00.002447", "end": "2023-08-03 16:18:11.426375", "msg": "non-zero return code", "rc": 2, "start": "2023-08-03 16:18:11.423928", "stderr": "/bin/sh: 1: set: Illegal option -o pipefail", "stderr_lines": ["/bin/sh: 1: set: Illegal option -o pipefail"], "stdout": "", "stdout_lines": []}
Any ideas? Thanks! ☺️
— Reply to this email directly, view it on GitHub https://github.com/bartdorlandt/ansible-role-poetry/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHT3H7DEAVM72WQQCNR6M3XTQXNFANCNFSM6AAAAAA3DOHBCI . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Hi @Hongbo-Miao ,
I've done some updates to support both linux and Mac. Please download the update from galaxy and give it a try.
Thanks @bartdorlandt ! I tried new version 0.1.0
. It succeed running. However, after installing, I am not be able to find in my Ubuntu by which poetry
. 🥲
And based on log, I am not sure why it is all about homebrew version in macOS:
Here is the log
/usr/bin/make -f /Users/hongbo-miao/Clouds/Git/hongbomiao.com/ansible/Makefile -C /Users/hongbo-miao/Clouds/Git/hongbomiao.com/ansible ansible-playbook-hm-ubuntu-group
ansible-playbook --inventory=inventory.yaml --vault-password-file=~/.ansible_vault_pass hm-ubuntu-group/playbook.yml
[WARNING]: Invalid characters were found in group names but not replaced, use
-vvvv to see details
PLAY [Install Poetry] **********************************************************
TASK [Gathering Facts] *********************************************************
ok: [hm-ubuntu]
TASK [bartdorlandt.poetry : Register if poetry is installed via Homebrew] ******
ok: [hm-ubuntu]
TASK [bartdorlandt.poetry : Install Poetry Other OSes] *************************
skipping: [hm-ubuntu]
TASK [bartdorlandt.poetry : Check Poetry virtualenvs.in-project config] ********
skipping: [hm-ubuntu]
TASK [bartdorlandt.poetry : Configure Poetry virtualenvs.in-project] ***********
skipping: [hm-ubuntu]
TASK [bartdorlandt.poetry : Check Poetry virtualenvs.prefer-active-python config] ***
skipping: [hm-ubuntu]
TASK [bartdorlandt.poetry : Configure Poetry virtualenvs.prefer-active-python] ***
skipping: [hm-ubuntu]
TASK [bartdorlandt.poetry : Add poetry zsh plugin directory] *******************
skipping: [hm-ubuntu]
TASK [bartdorlandt.poetry : Install Poetry for oh-my-zsh] **********************
skipping: [hm-ubuntu]
PLAY RECAP *********************************************************************
hm-ubuntu : ok=2 changed=0 unreachable=0 failed=0 skipped=7 rescued=0 ignored=0
Process finished with exit code 0
Here is full log with -vvvv
:
You might want to check the documentation on poetry, on the paths you'll need to add to your PATH environment variable.
Homebrew is also there to make it mac OS compatible. This module makes sure poetry is installed. You are responsible for your environment.
Hmm based on https://github.com/bartdorlandt/ansible-role-poetry/blob/4cb2eda5da627a4c6aace7d76a34a40dd2c6e60d/tasks/main.yml#L10
However, after running
- name: Install poetry
hosts: hm-ubuntu
roles:
- role: staticdev.pyenv
pyenv_version: v2.3.23
pyenv_env: user
pyenv_python_versions:
- 3.11.4
pyenv_global:
- 3.11.4
- role: bartdorlandt.poetry
vars:
virtualenvs_inproject: false
virtualenvs_prefer_active_python: false
I checked my Ubuntu folder, poetry
didn't get installed at ~/.local/bin/
:
parallels@ubuntu-linux-22-04-desktop:~$ which pyenv
/home/parallels/pyenv/bin/pyenv
parallels@ubuntu-linux-22-04-desktop:~$ cd ~/.local/bin/
parallels@ubuntu-linux-22-04-desktop:~/.local/bin$ ls
parallels@ubuntu-linux-22-04-desktop:~/.local/bin$
On the other side, you can see pyenv
from another role got installed successfully.
You ran it as root in the previous message right?
On Wed, 9 Aug 2023 at 18:56 Hongbo Miao @.***> wrote:
Hmm based on https://github.com/bartdorlandt/ansible-role-poetry/blob/4cb2eda5da627a4c6aace7d76a34a40dd2c6e60d/tasks/main.yml#L10
However, after running
- name: Install poetry hosts: hm-ubuntu roles:
- role: staticdev.pyenv pyenv_version: v2.3.23 pyenv_env: user pyenv_python_versions:
- 3.11.4 pyenv_global:
- 3.11.4
- role: bartdorlandt.poetry vars: virtualenvs_inproject: false virtualenvs_prefer_active_python: false
I checked my Ubuntu folder, poetry didn't get installed:
@.:~$ which pyenv /home/parallels/pyenv/bin/pyenv @.:~$ cd ~/.local/bin/ @.:~/.local/bin$ ls @.:~/.local/bin$
On the other side, you can see pyenv from another role got installed successfully.
— Reply to this email directly, view it on GitHub https://github.com/bartdorlandt/ansible-role-poetry/issues/1#issuecomment-1672332800, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHT3H4QEYFSXMHDWH3ODV3XUQPUPANCNFSM6AAAAAA3DOHBCI . You are receiving this because you modified the open/close state.Message ID: @.***>
task was skipped due to a incorrect condition. changed in v0.1.2
Cheers, Bart
On Wed, Aug 9, 2023 at 7:12 PM Bart Dorlandt @.***> wrote:
You ran it as root in the previous message right?
On Wed, 9 Aug 2023 at 18:56 Hongbo Miao @.***> wrote:
Hmm based on https://github.com/bartdorlandt/ansible-role-poetry/blob/4cb2eda5da627a4c6aace7d76a34a40dd2c6e60d/tasks/main.yml#L10
However, after running
- name: Install poetry hosts: hm-ubuntu roles:
- role: staticdev.pyenv pyenv_version: v2.3.23 pyenv_env: user pyenv_python_versions:
- 3.11.4 pyenv_global:
- 3.11.4
- role: bartdorlandt.poetry vars: virtualenvs_inproject: false virtualenvs_prefer_active_python: false
I checked my Ubuntu folder, poetry didn't get installed:
@.:~$ which pyenv /home/parallels/pyenv/bin/pyenv @.:~$ cd ~/.local/bin/ @.:~/.local/bin$ ls @.:~/.local/bin$
On the other side, you can see pyenv from another role got installed successfully.
— Reply to this email directly, view it on GitHub https://github.com/bartdorlandt/ansible-role-poetry/issues/1#issuecomment-1672332800, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHT3H4QEYFSXMHDWH3ODV3XUQPUPANCNFSM6AAAAAA3DOHBCI . You are receiving this because you modified the open/close state.Message ID: @.***>
Thanks @bartdorlandt ! It works well this time! 🚀
I am setting up Ubuntu 22.04 by
And got error
However, I can run
set -o pipefail && curl -sSL https://install.python-poetry.org | python3 -
directly in this Ubuntu:Any ideas? Thanks! ☺️