Hello, I'm Maneshwar. I'm building git-lrc, an AI code reviewer that runs on every commit. It is free, unlimited, and source-available on Github. Star Us to help devs discover the project. Do give it a try and share your feedback for improving the product.
Hi there! I’m building [LiveAPI], a first-of-its-kind tool that helps you automatically index API endpoints across all your repositories. LiveAPI makes it easier to discover, understand, and interact with APIs in large infrastructures.Manually installing PHP across servers? Nah.
Let's make it boringly repeatable with Ansible.
This playbook snippet handles PHP 7.3 installation along with all the commonly used extensions.
No more apt install gymnastics on every new box.
Prerequisites
- Ubuntu server (18.04 or later works well)
- Ansible installed on your control machine
- SSH access to target machine(s)
What This Playbook Does
- Adds the trusted Ondřej Surý PPA for PHP.
- Installs
php7.3. - Installs all commonly needed PHP 7.3 extensions.
- Verifies the installation with
php -v.
The Playbook
---
- name: Install PHP 7.3 and Extensions
hosts: all
become: true
tasks:
- name: Add PHP PPA repository
apt_repository:
repo: "ppa:ondrej/php"
state: present
update_cache: yes
- name: Install PHP 7.3
apt:
name: php7.3
state: present
update_cache: yes
- name: Verify PHP installation
command: php -v
register: php_version
changed_when: false
- name: Display PHP version
debug:
msg: "{{ php_version.stdout }}"
- name: Install PHP 7.3 extensions and dependencies
apt:
name:
- php7.3-bcmath
- php7.3-bz2
- php7.3-curl
- php7.3-gd
- php7.3-gmp
- php7.3-imap
- php7.3-intl
- php7.3-json
- php7.3-ldap
- php7.3-mbstring
- php7.3-mysql
- php7.3-opcache
- php7.3-readline
- php7.3-soap
- php7.3-sqlite3
- php7.3-tidy
- php7.3-xml
- php7.3-xmlrpc
- php7.3-xsl
- php7.3-zip
- php7.3-cli
- php7.3-common
state: present
update_cache: yes
Running the Playbook
ansible-playbook -i hosts.ini php73.yml
Make sure your inventory (hosts.ini) is properly set up and includes the correct ansible_user and SSH access.
Output You Should See
You’ll get output like:
TASK [Verify PHP installation]
ok: [myserver]
TASK [Display PHP version]
ok: [myserver] => {
"msg": "PHP 7.3.33-9+ubuntu18.04.1+deb.sury.org+1 (cli) ..."
}
Bonus: Reuse via Roles
Want to reuse this across projects? Move it into a role (e.g., roles/php73/) and include it like this:
roles:
- php73
Note
PHP 7.3 is EOL. Only use this if:
- You’re dealing with legacy apps.
- You’re explicitly required to stay on this version.
Otherwise, consider installing a more recent version like PHP 8.1 or 8.2.
🏁 That’s It
You now have a fully automated PHP 7.3 setup using Ansible. This keeps your infrastructure consistent, easy to update, and less prone to manual errors.
Let the YAML do the talking.
With you can generate interactive API docs that allow users to search and execute endpoints directly from the browser.
If you're tired of updating manually or syncing collections, give it a shot.
*AI agents write code fast. They also silently remove logic, change behavior, and introduce bugs -- without telling you. You often find out in production.
git-lrc fixes this. It hooks into git commit and reviews every diff before it lands. 60-second setup. Completely free.*
Any feedback or contributors are welcome! It's online, source-available, and ready for anyone to use.
⭐ Star it on GitHub:
HexmosTech
/
git-lrc
Free, Micro AI Code Reviews That Run on Git Commit
| 🇩🇰 Dansk | 🇪🇸 Español | 🇮🇷 Farsi | 🇫🇮 Suomi | 🇯🇵 日本語 | 🇳🇴 Norsk | 🇵🇹 Português | 🇷🇺 Русский | 🇦🇱 Shqip | 🇨🇳 中文 | 🇮🇳 हिन्दी |
git-lrc
Free, Micro AI Code Reviews That Run on Commit
GenAI today is a race car without brakes. It accelerates fast -- you describe something, and large blocks of code appear instantly. But AI agents silently break things: they remove logic, relax constraints, introduce expensive cloud calls, leak credentials, and change behavior -- without telling you. You often find out in production.
git-lrc is your braking system. It hooks into git commit and runs an AI review on every diff before it lands. 60-second setup. Completely free.
In short, git-lrc helps Prevent Outages, Breaches, and Technical Debt Before They Happen
At a glance: 10 risk categories · 100+ failure patterns tracked · every commit…

Top comments (1)
Are you republishing this article from somewhere else? PHP 7.3 reached its end-of-life almost 4 years ago. It should not be used.