Skip to content

Commit

Permalink
Merge pull request #278 from mekanix/feature/jexec
Browse files Browse the repository at this point in the history
Use jexec in order to support base jails
  • Loading branch information
mekanix authored Feb 14, 2023
2 parents f06f348 + 25ea617 commit 5c2ac8c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion scripts/default.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION=0.2.7
VERSION=0.3.0

BACKEND=${BACKEND:-"base"}
CBSD_WORKDIR=${CBSD_WORKDIR:-"/usr/cbsd"}
Expand Down
4 changes: 2 additions & 2 deletions scripts/puppet-provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ TYPE="${2}"
init() {
if [ "${TYPE}" = "jail" ]; then
mount_nullfs "${PWD}/puppet/manifests" "${CBSD_WORKDIR}/jails/${SERVICE}/usr/local/etc/puppet/manifests"
cbsd jexec "jname=${SERVICE}" cmd="pkg install -y puppet5"
jexec ${SERVICE} pkg install -y puppet5
elif [ "${TYPE}" = "bhyve" ]; then
reggae ssh provision ${SERVICE} sudo mount_nullfs /usr/src/puppet/manifests /usr/local/etc/puppet/manifests
reggae ssh provision ${SERVICE} sudo pkg install -y puppet5
Expand All @@ -31,7 +31,7 @@ trap "cleanup" HUP INT ABRT BUS TERM EXIT
init

if [ "${TYPE}" = "jail" ]; then
cbsd jexec "jname=${SERVICE}" cmd="puppet apply /usr/local/etc/puppet/manifests/site.pp"
jexec ${SERVICE} puppet apply /usr/local/etc/puppet/manifests/site.pp
elif [ "${TYPE}" = "bhyve" ]; then
reggae ssh provision ${SERVICE} sudo puppet apply /usr/local/etc/puppet/manifests/site.pp
else
Expand Down
4 changes: 2 additions & 2 deletions scripts/salt-provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fi

init() {
if [ "${TYPE}" = "jail" ]; then
cbsd jexec jname=${SERVICE} cmd="pkg install -y ${PY_PREFIX}-salt"
jexec ${SERVICE} pkg install -y ${PY_PREFIX}-salt
mkdir -p ${CBSD_WORKDIR}/jails/${SERVICE}/usr/local/etc/salt/minion.d >/dev/null 2>&1 || true
mkdir -p ${CBSD_WORKDIR}/jails/${SERVICE}/usr/local/etc/salt/states >/dev/null 2>&1 || true
mount_nullfs "${PWD}/salt/states" "${CBSD_WORKDIR}/jails/${SERVICE}/usr/local/etc/salt/states"
Expand Down Expand Up @@ -43,7 +43,7 @@ trap "cleanup" HUP INT ABRT BUS TERM EXIT
init

if [ "${TYPE}" = "jail" ]; then
cbsd jexec "jname=${SERVICE}" 'salt-call --local state.apply'
jexec ${SERVICE} salt-call --local state.apply
elif [ "${TYPE}" = "bhyve" ]; then
reggae ssh provision ${SERVICE} sudo salt-call --local state.apply
else
Expand Down

0 comments on commit 5c2ac8c

Please sign in to comment.