mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-14 06:12:34 +00:00
feat: Updates to hpa config and scripts.
This commit is contained in:
7
env/.config/hpa/config.toml
vendored
7
env/.config/hpa/config.toml
vendored
@@ -44,8 +44,8 @@ useVaultArgs = true
|
||||
# instead of the provided / default playbook.
|
||||
|
||||
[playbook]
|
||||
directory = '~/.local/share/hpa/playbook'
|
||||
inventory = '~/.local/share/hpa/playbook/inventory.ini'
|
||||
directory = '/root/.local/share/hpa/playbook'
|
||||
inventory = '/root/.local/share/hpa/playbook/inventory.ini'
|
||||
version = 'main'
|
||||
|
||||
# NOTE:
|
||||
@@ -53,7 +53,8 @@ version = 'main'
|
||||
# a remote git repository.
|
||||
[template]
|
||||
# The directory path on your local system to the template files.
|
||||
directory = '~/.local/share/hpa/template'
|
||||
directory = '/root/.local/share/hpa/template'
|
||||
vars = 'repo_vars'
|
||||
|
||||
# The url to a git repository that contains your template files.
|
||||
# url = 'https://git.example.com/consult-template.git'
|
||||
|
||||
9
env/.local/scripts/hpa
vendored
9
env/.local/scripts/hpa
vendored
@@ -10,16 +10,12 @@ set -o pipefail
|
||||
# Make sure to run 'hpa-init' first on this machine to setup
|
||||
# dependencies, if you have not done so already.
|
||||
#
|
||||
# This will mount my home directory inside the container, so
|
||||
# it should somewhat mirror like commands are run on the host os.
|
||||
#
|
||||
# To attach to a shell inside the container run:
|
||||
# `hpa bash`
|
||||
#
|
||||
# To run ansible vault commands inside the container run:
|
||||
# `hpa ansible-vault ...`
|
||||
#
|
||||
#
|
||||
|
||||
SCRIPTS=${SCRIPTS:-$HOME/.local/scripts}
|
||||
. "$SCRIPTS/utils/hpa/hpa.env"
|
||||
@@ -38,6 +34,9 @@ if [[ $HPA_AUTO_PULL == "1" ]] && [[ $diff -gt "$HPA_AUTO_PULL_INTERVAL" ]]; the
|
||||
fi
|
||||
|
||||
podman run --rm --interactive --tty \
|
||||
--volume "$HOME":/root \
|
||||
--volume "$HPA_CONFIG_DIR":/root/.config/hpa:ro \
|
||||
--volume "$HPA_DATA_DIR":/root/.local/share/hpa:ro \
|
||||
--volume "$HPA_CONSULTS_DIR":/consults \
|
||||
--volume "$PWD":/root/project \
|
||||
--secret "$HPA_VAULT_SECRET_KEY" \
|
||||
"$HPA_DOCKER_IMAGE:$HPA_DOCKER_TAG" "$@"
|
||||
|
||||
5
env/.local/scripts/utils/hpa/hpa-create
vendored
5
env/.local/scripts/utils/hpa/hpa-create
vendored
@@ -47,7 +47,7 @@ FLAGS:
|
||||
-p | --no-push: Do not push project to remote repository.
|
||||
|
||||
ENVIRONMENT:
|
||||
CONSULTS_DIR: Sets the location of new porjects
|
||||
CONSULTS_DIR: Sets the location of new projects
|
||||
(default: ~/work/consults)
|
||||
|
||||
CONSULT_ORIGIN_BASE_URL: Sets the base url for the project git origin.
|
||||
@@ -98,6 +98,9 @@ initialize-git() {
|
||||
pushd "$dir" &>/dev/null || exit 1
|
||||
(
|
||||
git init
|
||||
git lfs install
|
||||
git lfs track '*.png'
|
||||
git lfs track '*.pdf'
|
||||
git add .
|
||||
git commit --all --message="Initial commit"
|
||||
git remote add origin "$HPA_CONSULT_ORIGIN_BASE_URL/$(basename "$dir")"
|
||||
|
||||
Reference in New Issue
Block a user