docs: update README
This commit is contained in:
@@ -42,7 +42,13 @@ cd ./meshbook
|
|||||||
python3 -m venv ./venv
|
python3 -m venv ./venv
|
||||||
source ./venv/bin/activate
|
source ./venv/bin/activate
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
cp ./templates/meshcentral.conf.template ./meshcentral.conf
|
cp ./templates/api.conf.template ./api.conf
|
||||||
|
```
|
||||||
|
|
||||||
|
Next, make sure to fill in the following file:
|
||||||
|
|
||||||
|
```
|
||||||
|
nano ./api.conf
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Windows (PowerShell)
|
#### Windows (PowerShell)
|
||||||
@@ -53,10 +59,13 @@ cd .\meshbook
|
|||||||
python -m venv .\venv
|
python -m venv .\venv
|
||||||
.\venv\Scripts\activate
|
.\venv\Scripts\activate
|
||||||
pip install -r .\requirements.txt
|
pip install -r .\requirements.txt
|
||||||
cp .\templates\meshcentral.conf.template .\meshcentral.conf
|
cp .\templates\api.conf.template .\api.conf
|
||||||
```
|
```
|
||||||
|
|
||||||
> 📌 Rename `meshcentral.conf.template` to `meshcentral.conf` and fill in your actual connection details.
|
Also here, make sure to fill in the `./api.conf` file.
|
||||||
|
|
||||||
|
|
||||||
|
> 📌 Rename `api.conf.template` to `api.conf` and fill in your actual connection details.
|
||||||
> The URL must start with `wss://<MeshCentral-Host>`.
|
> The URL must start with `wss://<MeshCentral-Host>`.
|
||||||
|
|
||||||
|
|
||||||
@@ -68,13 +77,13 @@ Once installed and configured, run a playbook like this:
|
|||||||
### Linux:
|
### Linux:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
python3 meshbook.py -pb ./examples/echo_example.yaml
|
python3 meshbook.py -mb ./examples/echo_example.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
### Windows:
|
### Windows:
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
.\venv\Scripts\python.exe .\meshbook.py -pb .\examples\echo_example.yaml
|
.\venv\Scripts\python.exe .\meshbook.py -mb .\examples\echo_example.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
Use `--help` to explore available command-line options:
|
Use `--help` to explore available command-line options:
|
||||||
@@ -174,8 +183,6 @@ target_tag: "Production"
|
|||||||
|
|
||||||
> ⚠️ Tag values are **case-sensitive**.
|
> ⚠️ Tag values are **case-sensitive**.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## 📋 Example Playbook
|
## 📋 Example Playbook
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
@@ -195,7 +202,7 @@ Sample output:
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"Task 1": {
|
"task 1": {
|
||||||
"task_name": "Show contents of os-release",
|
"task_name": "Show contents of os-release",
|
||||||
"data": [
|
"data": [
|
||||||
{
|
{
|
||||||
@@ -212,9 +219,7 @@ Sample output:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## ⚠ Blocking Commands Warning
|
||||||
|
|
||||||
## ⚠️ Blocking Commands Warning
|
|
||||||
|
|
||||||
Avoid using commands that **block indefinitely** — MeshCentral requires **non-blocking** execution.
|
Avoid using commands that **block indefinitely** — MeshCentral requires **non-blocking** execution.
|
||||||
|
|
||||||
@@ -222,7 +227,7 @@ Avoid using commands that **block indefinitely** — MeshCentral requires **non-
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
apt upgrade # Without -y
|
apt upgrade # Without -y
|
||||||
sleep infinity
|
sleep infinity # Will never return
|
||||||
ping 1.1.1.1 # Without -c
|
ping 1.1.1.1 # Without -c
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -230,6 +235,7 @@ ping 1.1.1.1 # Without -c
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
apt upgrade -y
|
apt upgrade -y
|
||||||
|
sleep 3s
|
||||||
ping 1.1.1.1 -c 1
|
ping 1.1.1.1 -c 1
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -246,8 +252,6 @@ pip3 list
|
|||||||
|
|
||||||
The lists should match. If not, make sure the correct environment is activated.
|
The lists should match. If not, make sure the correct environment is activated.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## 📂 Project Structure (excerpt)
|
## 📂 Project Structure (excerpt)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@@ -269,11 +273,9 @@ meshbook/
|
|||||||
├── os_categories.json
|
├── os_categories.json
|
||||||
├── requirements.txt
|
├── requirements.txt
|
||||||
├── templates/
|
├── templates/
|
||||||
│ └── config.conf.template
|
│ └── api.conf.template
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## 📄 License
|
## 📄 License
|
||||||
|
|
||||||
This project is licensed under the terms of the GPL3 License. See [LICENSE](./LICENSE).
|
This project is licensed under the terms of the GPL3 License. See [LICENSE](./LICENSE).
|
||||||
|
|||||||
Reference in New Issue
Block a user