changed shell script examples to reflect added fully qualified domain name optional argument for subcommands running playbooks
This commit is contained in:
31
README.md
31
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`.
|
||||
|
||||
Reference in New Issue
Block a user