You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+31-26Lines changed: 31 additions & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -28,34 +28,33 @@
28
28
Searched for a way to run our playbooks automated without the need of AWX or other big projects while still being more stable and less error-prone than custom bash scripts. So I made Ansible-Link. This projects aims to be a KISS way to run ansible jobs remotely. Essentially a RESTful API sitting on top of [ansible-runner](https://github.com/ansible/ansible-runner).
29
29
30
30
## Prerequisites
31
-
* Python 3.7+
32
-
* PIP
33
31
* Your Ansible node
34
32
35
33
## Installation
36
-
* Clone the repository (on your ansible-node):
37
-
```shell
38
-
git clone git@github.com:lfkdev/ansible-link.git
39
-
cd ansible-link
40
-
```
34
+
The fastest way to set up Ansible-Link is by using the provided `install.sh` script:
- Check for necessary dependencies and install them if missing.
43
+
- Download and install Ansible-Link.
44
+
- Set up a Python virtual environment.
45
+
- Configure a systemd service for Ansible-Link.
46
+
47
+
After the installation, you can start using Ansible-Link immediately. You probably need to change some config values for your ansible environment `/opt/ansible-link/config.yml`
47
48
48
-
* Set config values in `config.yml`
49
49
```yaml
50
50
playbook_dir: '/etc/ansible/'
51
51
inventory_file: '/etc/ansible/environments/hosts'
52
+
...
52
53
```
53
54
54
-
* Start Ansible-Link
55
-
```shell
56
-
python3 ansible_link/ansible_link.py
57
-
```
58
-
The API will be accessible at localhost:port (default 5001) or wherever you bind it to.
55
+
To add more workers or change the user, modify `/etc/systemd/system/ansible-link.service`
56
+
> ⚠️ **Note:** Currently, only Ubuntu versions 16.04 and higher, or Debian versions 9 and higher are officially supported.
57
+
> Other operating systems might also work but have not been tested. You can clone the repository and perform a manual installation if you are using a different OS.
59
58
60
59
## API Documentation
61
60
The API documentation is available via the Swagger UI.
@@ -128,20 +127,26 @@ Leave empty to allow all playbooks. This is for the backend, you could also use
128
127
129
128
## Prod environment
130
129
131
-
**Use WSGI for prod ENV (gunicorn) + systemd service**
130
+
You can use the install script `install.sh` to get a production-ready environment for Ansible-Link.
131
+
132
+
The install script will:
133
+
- Set up a Python VENV
134
+
- Configure a systemd service to manage Ansible-Link
135
+
- Utilize Gunicorn as the WSGI server.
136
+
137
+
You can use a webserver like Caddy to add Basic Authentication and TLS to your Ansible-Link setup.
0 commit comments