/easy-installer-updater-cli

Install or Update any particular packages 1 click with Ansible.

Primary LanguageGo

Easy Package Installer/Updater for Linux (Ansible)

A simple wrapper over Ansible that allows you to install the right package in 1 click without writing a playbook, just by passing an argument.

This is a simple CLI utility that helps install and keep specific packages up-to-date on Ubuntu systems. The utility checks for updates to the specified package and automates the process of updating it to the latest version.

This is a simple utility written in Go that can be used to install or update packages on a system. It uses Ansible as the underlying technology for installing packages. If Ansible is not already installed on the system, the utility provides the option to install it.

Note

  • This utility is designed now to run on Ubuntu distributives only.
  • This utility install the LATEST versions of packages.

Features

  • Installs the specified package if it's not already installed
  • Checks for updates to the specified package
  • Automates the process of updating the package to the latest version
  • Installs Python3 if it's not already installed
  • Installs Ansible if it's not already installed

Requirements

  • Ubuntu 18.04+

Getting started

  1. Download and Install:
apt update && \
apt install curl -y && \
curl -LJO https://github.com/sv222/easy-installer-updater-cli/releases/download/v0.1.0/easy-package-installer && \
chmod +x easy-package-installer && \
mv easy-package-installer /usr/local/bin
  1. Usage
easy-package-installer [package]

Usage Example

To install or update a package, simply run the utility with the name of the package as the last argument.

For example, to install the package nginx:

easy-package-installer nginx

Output:

root@79d5ce20a1ca:/# easy-package-installer nginx
Python3 is not installed.
Starting Python3 installation.
Python3 installed.
Python3 is already installed.
Ansible is not installed.
Starting Ansible installation.
Ansible installed.
Ansible is already installed.
nginx is not installed.
Running Ansible playbook to install nginx...
nginx installed and started.
root@79d5ce20a1ca:/#

Build from source

  1. Clone the repository:
https://github.com/sv222/easy-installer-updater-cli.git
  1. Build & Install the binary using the Makefile:
make build && make install

Note: You can specify cli name in Makefile BINARY_NAME=easy-package-installer

  1. Now you can run the utility to install or update a package.

Docker Usage

Build the Docker Image

docker build -t app .

Run the Container

docker run app [package-name]

Contributing

Feel free to contribute to this project by submitting pull requests or reporting issues.

License

This project is licensed under the MIT License.