From 673e3188246ffe1aaf98aca2f84aafcb0a3a8a2e Mon Sep 17 00:00:00 2001 From: Alex Tavarez Date: Tue, 14 Jul 2026 15:05:51 -0400 Subject: [PATCH] changed shell script examples to reflect added fully qualified domain name optional argument for subcommands running playbooks --- README.md | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 8dee2ce..a204959 100644 --- a/README.md +++ b/README.md @@ -188,7 +188,7 @@ 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 the `ansible-playbook` commands for the container routing case, though it is a WIP that currently only makes sense for development mode playbook executions. I plan to replace it with a CLI app covering more intended use-cases. +As an alternative, you can use the `skato-ansible` shell script in `$ANSIBLE_PROJECT_ROOT` as an abstraction of the `ansible-playbook` commands for the container routing case. I plan to replace it with a CLI app covering more intended use-cases. When using the `skato-ansible.sh` script in development mode for the container routing use case: @@ -196,15 +196,34 @@ When using the `skato-ansible.sh` script in development mode for the container r #!/bin/bash set -euo pipefail -./skato-ansible.sh init vps -s 0 -v 2 -m dev -n staging0.test +./skato-ansible.sh init vps -v 3 -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 bootstrap vps -s 1 -v 3 -m dev -n staging0.test -./skato-ansible.sh init homeserver -s 0 -v 2 -m dev -n staging1.test +./skato-ansible.sh init homeserver -v 3 -m dev -n staging1.test # BELOW ONLY 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 +./skato-ansible.sh bootstrap vps -s 1 -v 3 -m dev -n staging1.test +``` + +Otherwise, in production mode: + +```bash +#!/bin/bash +set -euo pipefail + +INVENTORY_HOSTNAMES=(web1 web2) +FQDN=web.site + +./skato-ansible.sh init vps -v 3 -n "${INVENTORY_HOSTNAME[0]}" -d "$FQDN" +./skato-ansible.sh populate-agent staging +./skato-ansible.sh bootstrap vps -s 1 -v 3 -n "${INVENTORY_HOSTNAME[0]}" -d "$FQDN" + +./skato-ansible.sh init homeserver -v 3 -n "${INVENTORY_HOSTNAME[1]}" -d "$FQDN" +# BELOW ONLY IF $SKANSIBLE_SSH_KEY ALTERED IN THE SHELL SCRIPT +# ./skato-ansible.sh populate-agent staging +./skato-ansible.sh bootstrap vps -s 1 -v 3 -n "${INVENTORY_HOSTNAME[1]}" -d "$FQDN" ``` > [!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 before running the above shell script from `$ANSIBLE_PROJECT_ROOT`. +> 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 before running the above shell scripts from `$ANSIBLE_PROJECT_ROOT`.