hnimminh / libresbc

An open source Session Border Controller 🌟 The SBC you dream about 🗽 LibreSBC will help you save thousands of dollars.
https://github.com/hnimminh/libresbc
MIT License
357 stars 80 forks source link

[BUG] installation of libre part failed #18

Closed khorsmann closed 2 years ago

khorsmann commented 2 years ago

Describe the bug

minimal buster image, ansible 2.9.x (documentation didnt told the ansible version needed) with pip3 installed, local install, sudo without password, rsync there. rsync in roles/libre/tasks/liberator.yml didnt work correctly:

` ansible-playbook playbooks/deployment.yml -i inventories/production -l "sbc01.example.com" -t "libre"

karsten@sbc01:~/_git/libresbc/build/ansible$ ansible-playbook playbooks/deployment.yml -i inventories/production -l "sbc01.example.com" -t "libre"

PLAY [LibreSBC Deployment] *****

TASK [Gathering Facts] ***** [WARNING]: Platform linux on host sbc01.example.com is using the discovered Python interpreter at /usr/bin/python, but future installation of another Python interpreter could change this. See https://docs.ansible.com/ansible/2.9/reference_appendices/interpreter_discovery.html for more information. ok: [sbc01.example.com]

TASK [libre : deploy liberator] **** included: /home/karsten/_git/libresbc/build/ansible/roles/libre/tasks/liberator.yml for sbc01.example.com

TASK [Create directory /opt/libresbc/0.5.7/liberator in target host] *** ok: [sbc01.example.com]

TASK [libre : Copy liberator role source to target host] *** fatal: [sbc01.example.com]: FAILED! => {"changed": false, "cmd": "/usr/bin/rsync --delay-updates -F --compress --archive --rsync-path=sudo rsync --exclude=*.pyc --out-format=<>%i %n%L /home/karsten/_git/libresbc/liberator/ /opt/libresbc/0.5.7/liberator/", "msg": "rsync: ERROR: cannot stat destination \"/opt/libresbc/0.5.7/liberator/\": Permission denied (13)\nrsync error: errors selecting input/output files, dirs (code 3) at main.c(660) [Receiver=3.1.3]\n", "rc": 3}

PLAY RECAP ***** sbc01.example.com : ok=3 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0

karsten@sbc01:~/_git/libresbc/build/ansible$ ansible --version ansible 2.9.13 config file = /home/karsten/_git/libresbc/build/ansible/ansible.cfg configured module search path = ['/home/karsten/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/lib/python3.7/dist-packages/ansible executable location = /usr/local/bin/ansible python version = 3.7.3 (default, Jan 22 2021, 20:04:44) [GCC 8.3.0]

karsten@sbc01:~/_git/libresbc/build/ansible$ lsb_release -a No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 10 (buster) Release: 10 Codename: buster

`

hnimminh commented 2 years ago

Hi @khorsmann, I'm noted on the ansible version #19 . I run on the same ansible version as your ansible 2.9.13

For the rsync issue, seem like the permission issue that ssh user was not able become root user. unable to reproduce on my side.

khorsmann commented 2 years ago

The issue is - i installed ansible on the same VM where libresbc should deployed (localhost to say). Then the synchronize_module get crazy (tmp permissions and whatever). This parts works with ansible admin host and libresbc on diffrent VMs.