remove dev configs

This commit is contained in:
LinuxSquare 2024-08-28 20:48:21 +02:00
parent 90d27a5eb6
commit 4d7f153861
2 changed files with 5 additions and 11 deletions

View file

@ -1,7 +1,6 @@
#!/usr/bin/env bash
#readonly CONFIG_ROOT="/srv/ansible/playbooks"
readonly CONFIG_ROOT="$PWD/ansible-playbooks"
readonly CONFIG_ROOT="/srv/ansible/playbooks"
function config_help() {
cat << EOF
@ -16,19 +15,16 @@ EOF
# Pulls all ansible playbooks from the remote git repo
function config_pull() {
echo "Pulling latest changes of repo"
# git -C "$CONFIG_ROOT" pull
git -C "$CONFIG_ROOT" pull
}
# Executes an ansible-playbook on top.ansible.yml
function config_full() {
echo "Executing full playbook run"
# ansible-playbook $([[ $debuglevel -eq 4 ]] && echo '-v') $([[ $dryrun -eq 1 ]] && echo '-C') "${CONFIG_ROOT}/top.ansible.yml"
ansible-playbook $([[ $debuglevel -eq 4 ]] && echo '-v') $([[ $dryrun -eq 1 ]] && echo '-C') "${CONFIG_ROOT}/top.ansible.yml"
}
# Execute on a single playbook ansible-playbook
function config_single() {
echo "Executing single playbook: $1"
local path="$CONFIG_ROOT/${1/\./\/}" # replace dots in path with forward-slashes
local newpath="$path" # set $newpath to $path for later checking
@ -47,6 +43,5 @@ function config_single() {
echo "Module '$1' not found"
exit 1
fi
echo "$newpath $([[ $debuglevel -eq 4 ]] && echo '-v') $([[ $dryrun -eq 1 ]] && echo '-C')"
# ansible-playbook $([[ $debuglevel -eq 4 ]] && echo '-v') $([[ $dryrun -eq 1 ]] && echo '-C') "$newpath"
ansible-playbook $([[ $debuglevel -eq 4 ]] && echo '-v') $([[ $dryrun -eq 1 ]] && echo '-C') "$newpath"
}

3
novos
View file

@ -4,8 +4,7 @@
readonly PKGVER="0.0.1"
readonly LICENSE="GNU AGPLv3"
readonly ROOTPATH="$(dirname $(readlink -f $(which ${0})))"
#readonly CONFIG="/usr/local/noveria/etc/novos/novos.json
readonly CONFIG="./config.json"
readonly CONFIG="/usr/local/noveria/etc/novos/novos.json"
for util in ${ROOTPATH}/functions/*; do
source ${util}