start supporting multiple branches
This commit is contained in:
+2
-1
@@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
GIT_REPO_BASE="https://gitea.admin-a.hpetersenfamily.com/heath/ansible"
|
GIT_REPO_BASE="https://gitea.admin-a.hpetersenfamily.com/heath/ansible"
|
||||||
GIT_REPO="${GIT_REPO_BASE}.git"
|
GIT_REPO="${GIT_REPO_BASE}.git"
|
||||||
|
GIT_REPO_BRANCH="${1}"
|
||||||
GIT_REPO_sudoers_d_hpf="${GIT_REPO_BASE}/raw/branch/main/files/etc_sudoers_d_hpf"
|
GIT_REPO_sudoers_d_hpf="${GIT_REPO_BASE}/raw/branch/main/files/etc_sudoers_d_hpf"
|
||||||
GIT_REPO_ansible_pull_sh="${GIT_REPO_BASE}/raw/branch/main/files/home_hpf_ans_bin_ansible_pull_sh"
|
GIT_REPO_ansible_pull_sh="${GIT_REPO_BASE}/raw/branch/main/files/home_hpf_ans_bin_ansible_pull_sh"
|
||||||
|
|
||||||
@@ -150,4 +151,4 @@ mkdir -p "${ANSIBLE_PULL_SH_LOG_DIR}"
|
|||||||
chown hpf-ans:root "${ANSIBLE_PULL_SH_LOG_DIR}"; chmod ug=rwx,o= "${ANSIBLE_PULL_SH_LOG_DIR}"
|
chown hpf-ans:root "${ANSIBLE_PULL_SH_LOG_DIR}"; chmod ug=rwx,o= "${ANSIBLE_PULL_SH_LOG_DIR}"
|
||||||
|
|
||||||
# Run ansible-pull to finish up
|
# Run ansible-pull to finish up
|
||||||
as_hpf_ans "bin/ansible-pull.sh bootstrap.yml"
|
as_hpf_ans "bin/ansible-pull.sh ${GIT_REPO_BRANCH} bootstrap.yml"
|
||||||
|
|||||||
@@ -23,5 +23,5 @@ if ! flock -n 9 ; then echo " - ERROR - Another copy of ${SCRIPT_NAME} is alread
|
|||||||
|
|
||||||
# - Do our work
|
# - Do our work
|
||||||
echo
|
echo
|
||||||
ansible-pull --only-if-changed --url "${GIT_REPO}" --checkout main "${@}"
|
ansible-pull --only-if-changed --url "${GIT_REPO}" --checkout "${@}"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user