Let's Upgrade the Book

sudo yum -y update &&
sudo yum -y install epel-release &&
sudo yum -y install python-pip &&
sudo yum -y install vim wget dnf&&
sudo pip install alembic ansible &&
sudo pip install --upgrade pip &&
sudo mkdir /etc/ansible &&
sudo chown astmin:astmin /etc/ansible &&
sudo echo "[starfish]" >> /etc/ansible/hosts &&
sudo echo "localhost ansible_connection=local" >> /etc/ansible/hosts &&
mkdir -p ~/ansible/playbooks

To complete the above shell script work properly what needs to be Edited?
Please Help. Thanks.

P.S:
As the book suggests I have installed CentOS7 and also trying on the same…

That book with CentOS 7 must be old and about which book are we talking about? What errors do you get?

Neither alembic nor ansible are part of a standard installation.

Book Name: Asterisk : The Definitive Guide, 5th Edition
Page Number on Book: 30
Errors:

Collecting alembic
  Downloading https://files.pythonhosted.org/packages/30/b9/5526b43a4c54d177ab14af0af4b5c31d73db33d1ad3e30976d3b023e0594/alembic-1.7.7.tar.gz (1.2MB)
    100% |████████████████████████████████| 1.2MB 713kB/s 
  Running setup.py (path:/tmp/pip-build-fl8Stk/alembic/setup.py) egg_info for package alembic produced metadata for project name unknown. Fix your #egg=alembic fragments.
Collecting ansible
  Downloading https://files.pythonhosted.org/packages/b5/6e/5806eafaa71ab5471cfc390089a89c7815ab841657d6517fd72df3d41862/ansible-5.5.0.tar.gz (42.0MB)
    100% |████████████████████████████████| 42.0MB 19kB/s 
    Complete output from command python setup.py egg_info:
    /usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'project_urls'
      warnings.warn(msg)
    /usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'python_requires'
      warnings.warn(msg)
    error in ansible setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-fl8Stk/ansible/
You are using pip version 8.1.2, however version 22.0.4 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

AFAIK, this is not a free book and it is from 2019. You cannot expect that the folks here have it and know how the CentOS environment has changed since then and hence can quickly adapt the ansible playbooks. Obviously, your problems already seem to start with the python environment and that has nothing to do with Asterisk. That is not to say that ansible etc is a bad idea, but when you are still learning you are making your environment unnecessarily complex, imo.

It is much easier to start with the standard installation. Since Asterisk is a toolkit for developers, you sort of always have to understand the low level stuff.

Hi. Sincerely requesting you to kindly provide a valid link which explains in detail the successful standard installation of Asterisk. Hope you Help. Thank You.

https://wiki.asterisk.org/wiki/display/AST/Getting+Started

It’s a pretty standard process. I’d first install some missing packages with the help of ./config/scripts/install_prereq, then run configure followed by make. Some not so essential packages are not in the default repos on RedHat based machines. Additional repos can be a pain in the neck in the long run—just saying. The rest is learning.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.