added more shell script examples, this time showing how to use the shell script in this repo

This commit is contained in:
2026-07-14 09:28:38 -04:00
parent ba7283b583
commit c7b1d2d30b

View File

@@ -147,4 +147,23 @@ Depending on what you are trying to do with a new playbook, the best approach ma
### CLI Tool
As an alternative, you can use the `skato-ansible` shell script in `$ANSIBLE_PROJECT_ROOT` as an abstraction of these `ansible-playbook` commands, though it is a WIP that currently only makes sense for development mode playbook executions and that I plan to replace with a `git` submodule pulling from a CLI app project in the long-term.
As an alternative, you can use the `skato-ansible` shell script in `$ANSIBLE_PROJECT_ROOT` as an abstraction of these `ansible-playbook` commands, though it is a WIP that currently only makes sense for development mode playbook executions. I plan to replace it with a CLI app.
When using the `skato-ansible.sh` script in development mode for the container routing use case:
> [!IMPORTANT]
> If you have different SSH keypairs for staging, make sure to change the value of `SKANSIBLE_SSH_KEYS` environment variable in the `${ANSIBLE_PROJECT_ROOT}/skato-ansible.sh` shell script.
```bash
#!/bin/bash
set -euo pipefail
./skato-ansible.sh init vps -s 0 -v 2 -m dev -n staging0.test
./skato-ansible.sh populate-agent staging
./skato-ansible.sh bootstrap vps -s 1 -v 2 -m dev -n staging0.test
./skato-ansible.sh init homeserver -s 0 -v 2 -m dev -n staging1.test
# BELOW IS OPTIONAL, IF $SKANSIBLE_SSH_KEY altered in the shell script
# ./skato-ansible.sh populate-agent staging
./skato-ansible.sh bootstrap vps -s 1 -v 2 -m dev -n staging1.test
```