-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dd674b0
commit 4ad3260
Showing
2 changed files
with
96 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
|
||
# Quick Start Guide | ||
|
||
This guide will help you get started with **Ansible Lite** by showing you how to install the sources and configure your repositories for monitoring. | ||
|
||
## Installation | ||
|
||
To install **Ansible Lite**, follow these steps: | ||
|
||
|
||
```bash | ||
curl -fsSL https://aidalinfo.github.io/aidalinfo-source/aidalinfo.gpg.key -o /etc/apt/keyrings/aidalinfo.asc | ||
echo "deb [trusted=yes] https://aidalinfo.github.io/aidalinfo-source/ stable main" | sudo tee /etc/apt/sources.list.d/aidalinfo.list | ||
sudo apt update | ||
sudo apt install ansible-lite | ||
``` | ||
## Configuration | ||
|
||
The main configuration files for Ansible Lite are located in /etc/ansible-lite. The most important file is repos.yaml, which allows you to configure the GitHub repositories to monitor. | ||
|
||
/etc/ansible-lite/repos.yaml | ||
Here’s an example configuration for monitoring repositories: | ||
|
||
```yaml | ||
repos: | ||
demo: | ||
url: "https://github.com/Killian-Aidalinfo/demo-ansible-lite" | ||
watcher: "*/2 * * * *" | ||
init: "init.sh" | ||
branch: "main" | ||
path: "/tmp/" | ||
``` | ||
### Explanation of the fields: | ||
- repos: This is the top-level key that contains all the repositories you want to monitor. | ||
- demo: The name of the repository block (you can change this to any name you'd like). | ||
- url: The URL of the GitHub repository to monitor. | ||
- watcher: The cron schedule for how often to check the repository for changes (e.g., every 2 minutes). | ||
- init: The entry script to execute when a new commit is detected (in this example, init.sh). | ||
- branch: The branch to monitor (e.g., main). | ||
- path: The local directory where the repository will be cloned. | ||
### Editing repos.yaml | ||
Open the configuration file for editing: | ||
```bash | ||
sudo nano /etc/ansible-lite/repos.yaml | ||
``` | ||
Add your repositories using the format above, and save the file. | ||
|
||
Restart the ansible-lite service to apply your configuration: | ||
|
||
```bash | ||
sudo systemctl restart ansible-lite | ||
``` | ||
Note: Any changes to repos.yaml require restarting the ansible-lite service to take effect. | ||
|
||
You’re all set! Ansible Lite will now manage your repositories, execute your scripts on new commits, and help automate your server management. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,35 @@ | ||
# Welcome to MkDocs | ||
# Ansible Lite (Beta) | ||
|
||
For full documentation visit [mkdocs.org](https://www.mkdocs.org). | ||
**Ansible Lite** is a lightweight automation tool designed to simplify infrastructure management without the overhead of traditional Ansible. This project was born from the desire to have a management system for around ten servers, without the need to set up a centralized Ansible server, which requires physical and hardware resources. | ||
|
||
## Commands | ||
This version is currently in **beta** and under development. If you encounter any issues or bugs, please feel free to open an issue on GitHub: [https://github.com/aidalinfo/ansible-lite/issues](https://github.com/aidalinfo/ansible-lite/issues). | ||
|
||
* `mkdocs new [dir-name]` - Create a new project. | ||
* `mkdocs serve` - Start the live-reloading docs server. | ||
* `mkdocs build` - Build the documentation site. | ||
* `mkdocs -h` - Print help message and exit. | ||
## Project goals | ||
|
||
## Project layout | ||
**Ansible Lite** offers a decentralized solution, ideal for small infrastructures. Unlike other tools that require agent servers or complex setups, **Ansible Lite** relies on a simple system that monitors GitHub repositories with a cron **watcher** to detect changes and execute the appropriate actions. | ||
|
||
mkdocs.yml # The configuration file. | ||
docs/ | ||
index.md # The documentation homepage. | ||
... # Other markdown pages, images and other files. | ||
## How It Works | ||
|
||
The core functionality of **Ansible Lite** is based on monitoring GitHub repositories. Here's how it works: | ||
|
||
- **No direct SSH instructions**: Unlike most infrastructure management tools, **Ansible Lite** focuses only on monitoring changes in GitHub repositories. | ||
|
||
- A **watcher** is configured with a **cron** job to regularly monitor repositories. | ||
|
||
- On each cron execution, the watcher checks if a new commit has been made since the last execution. | ||
|
||
- If a new commit is detected, the defined **entry script** in the repository is automatically executed to apply the necessary updates or changes. | ||
|
||
## Why Ansible Lite? | ||
|
||
- **Simplicity**: No need for a dedicated Ansible server. The tool works directly with GitHub to monitor changes and automate tasks. | ||
|
||
- **Lightweight**: Designed for environments that don't require heavy infrastructure. | ||
|
||
- **Decentralization**: By leveraging GitHub, you can manage your configurations and updates in a simple and efficient way. | ||
|
||
- **Automation through commits**: As soon as a commit is pushed to a monitored repository, the system can automatically trigger the entry script to apply the updates. | ||
|
||
## Beta in Development | ||
|
||
The **Ansible Lite** project is in beta and still under active development. We encourage users to test the tool and provide feedback via issues if any bugs or problems are encountered: [Open an issue](https://github.com/aidalinfo/ansible-lite/issues). |