forked from ungleich-public/cdist
Merge remote-tracking branch 'ungleich/master' into fix-hostdir
This commit is contained in:
commit
a3d15caaa1
211 changed files with 3853 additions and 1304 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -9,7 +9,7 @@ docs/man/man*/*.html
|
|||
docs/man/man*/*.xml
|
||||
docs/man/man*/docbook-xsl.css
|
||||
docs/man/man7/cdist-type__*.rst
|
||||
docs/man/man7/cdist-reference.rst
|
||||
docs/man/cdist-reference.rst
|
||||
|
||||
# Ignore cdist cache for version control
|
||||
/cache/
|
||||
|
@ -20,8 +20,9 @@ MANIFEST
|
|||
dist/
|
||||
cdist/version.py
|
||||
|
||||
#sphinx build dir
|
||||
# sphinx build dirs, cache
|
||||
_build/
|
||||
docs/dist
|
||||
|
||||
# Packaging: Archlinux
|
||||
/PKGBUILD
|
||||
|
|
30
Makefile
30
Makefile
|
@ -46,7 +46,8 @@ MAN7DSTDIR=$(MANDIR)/man7
|
|||
|
||||
# Manpages #1: Types
|
||||
# Use shell / ls to get complete list - $(TYPEDIR)/*/man.rst does not work
|
||||
MANTYPESRC=$(shell ls $(TYPEDIR)/*/man.rst)
|
||||
# Using ls does not work if no file with given pattern exist, so use wildcard
|
||||
MANTYPESRC=$(wildcard $(TYPEDIR)/*/man.rst)
|
||||
MANTYPEPREFIX=$(subst $(TYPEDIR)/,$(MAN7DSTDIR)/cdist-type,$(MANTYPESRC))
|
||||
MANTYPES=$(subst /man.rst,.rst,$(MANTYPEPREFIX))
|
||||
|
||||
|
@ -62,17 +63,17 @@ $(MANREF): $(MANREFSH)
|
|||
$(MANREFSH)
|
||||
|
||||
# Manpages #3: generic part
|
||||
mansphinxman: $(MANTYPES) $(MANREF)
|
||||
mansphinxman: $(MANTYPES) $(MANREF) $(PYTHON_VERSION)
|
||||
$(SPHINXM)
|
||||
|
||||
mansphinxhtml: $(MANTYPES) $(MANREF)
|
||||
mansphinxhtml: $(MANTYPES) $(MANREF) $(PYTHON_VERSION)
|
||||
$(SPHINXH)
|
||||
|
||||
man: mansphinxman mansphinxhtml
|
||||
|
||||
# Manpages #5: release part
|
||||
MANWEBDIR=$(WEBBASE)/man/$(CHANGELOG_VERSION)
|
||||
MANBUILDDIR=$(MANDIR)/_build/html
|
||||
MANBUILDDIR=docs/dist/html
|
||||
|
||||
man-dist: man
|
||||
rm -rf "${MANWEBDIR}"
|
||||
|
@ -88,6 +89,25 @@ man-latest-link: web-pub
|
|||
ssh staticweb.ungleich.ch \
|
||||
"cd /home/services/www/nico/nico.schottelius.org/www/software/cdist/man/ && rm -f latest && ln -sf "$(CHANGELOG_VERSION)" latest"
|
||||
|
||||
# Manpages: .cdist Types
|
||||
DOT_CDIST_PATH=${HOME}/.cdist
|
||||
DOTMAN7DSTDIR=$(MAN7DSTDIR)
|
||||
DOTTYPEDIR=$(DOT_CDIST_PATH)/type
|
||||
DOTMANTYPESRC=$(wildcard $(DOTTYPEDIR)/*/man.rst)
|
||||
DOTMANTYPEPREFIX=$(subst $(DOTTYPEDIR)/,$(DOTMAN7DSTDIR)/cdist-type,$(DOTMANTYPESRC))
|
||||
DOTMANTYPES=$(subst /man.rst,.rst,$(DOTMANTYPEPREFIX))
|
||||
|
||||
# Link manpage: do not create man.html but correct named file
|
||||
$(DOTMAN7DSTDIR)/cdist-type%.rst: $(DOTTYPEDIR)/%/man.rst
|
||||
ln -sf "$^" $@
|
||||
|
||||
# Manpages #3: generic part
|
||||
dotmansphinxman: $(DOTMANTYPES)
|
||||
$(SPHINXM)
|
||||
|
||||
dotman: dotmansphinxman
|
||||
|
||||
|
||||
################################################################################
|
||||
# Speeches
|
||||
#
|
||||
|
@ -192,7 +212,7 @@ release:
|
|||
#
|
||||
|
||||
clean:
|
||||
rm -f $(MAN7DSTDIR)/cdist-reference.rst
|
||||
rm -f $(MANDIR)/cdist-reference.rst
|
||||
|
||||
find "$(MANDIR)" -mindepth 2 -type l \
|
||||
| xargs rm -f
|
||||
|
|
344
bin/build-helper.freebsd
Executable file
344
bin/build-helper.freebsd
Executable file
|
@ -0,0 +1,344 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# 2011-2013 Nico Schottelius (nico-cdist at schottelius.org)
|
||||
# 2016 Darko Poljak (darko.poljak at gmail.com)
|
||||
#
|
||||
# This file is part of cdist.
|
||||
#
|
||||
# cdist is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# cdist is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
#
|
||||
# This file contains the heavy lifting found usually in the Makefile
|
||||
#
|
||||
|
||||
# vars for make
|
||||
helper=$0
|
||||
|
||||
basedir=${0%/*}/../
|
||||
# run_as is used to check how the script is called (by $0 value)
|
||||
# currently supported sufixes for $0 are:
|
||||
# .freebsd - run as freebsd
|
||||
basename=${0##*/}
|
||||
run_as=${basename#*.}
|
||||
case "$run_as" in
|
||||
freebsd)
|
||||
to_a=cdist-configuration-management
|
||||
to_d=googlegroups.com
|
||||
from_a=darko.poljak
|
||||
from_d=gmail.com
|
||||
ml_name="Darko Poljak"
|
||||
ml_sig_name="Darko"
|
||||
|
||||
# vars for make
|
||||
WEBDIR=../vcs/www.nico.schottelius.org
|
||||
;;
|
||||
*)
|
||||
to_a=cdist
|
||||
to_d=l.schottelius.org
|
||||
from_a=nico-cdist
|
||||
from_d=schottelius.org
|
||||
ml_name="Nico -telmich- Schottelius"
|
||||
ml_sig_name="Nico"
|
||||
|
||||
# vars for make
|
||||
WEBDIR=$$HOME/vcs/www.nico.schottelius.org
|
||||
;;
|
||||
esac
|
||||
|
||||
# Change to checkout directory
|
||||
cd "$basedir"
|
||||
|
||||
version=$(git describe)
|
||||
|
||||
option=$1; shift
|
||||
|
||||
case "$option" in
|
||||
print-make-vars)
|
||||
printf "helper: ${helper}\n"
|
||||
printf "WEBDIR: ${WEBDIR}\n"
|
||||
;;
|
||||
print-runas)
|
||||
printf "run_as: $run_as\n"
|
||||
;;
|
||||
changelog-changes)
|
||||
if [ "$#" -eq 1 ]; then
|
||||
start=$1
|
||||
else
|
||||
start="[[:digit:]]"
|
||||
fi
|
||||
|
||||
end="[[:digit:]]"
|
||||
|
||||
awk -F: "BEGIN { start=0 }
|
||||
{
|
||||
if(start == 0) {
|
||||
if (\$0 ~ /^$start/) {
|
||||
start = 1
|
||||
}
|
||||
} else {
|
||||
if (\$0 ~ /^$end/) {
|
||||
exit
|
||||
} else {
|
||||
print \$0
|
||||
}
|
||||
}
|
||||
}" "$basedir/docs/changelog"
|
||||
;;
|
||||
|
||||
changelog-version)
|
||||
# get version from changelog
|
||||
grep '^[[:digit:]]' "$basedir/docs/changelog" | head -n1 | sed 's/:.*//'
|
||||
;;
|
||||
|
||||
check-date)
|
||||
# verify date in changelog is today
|
||||
date_today="$(date +%Y-%m-%d)"
|
||||
date_changelog=$(grep '^[[:digit:]]' "$basedir/docs/changelog" | head -n1 | sed 's/.*: //')
|
||||
|
||||
if [ "$date_today" != "$date_changelog" ]; then
|
||||
echo "Date in changelog is not today"
|
||||
echo "Changelog: $date_changelog"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
check-unittest)
|
||||
"$0" test
|
||||
;;
|
||||
|
||||
blog)
|
||||
version=$1; shift
|
||||
blogfile=$1; shift
|
||||
dir=${blogfile%/*}
|
||||
file=${blogfile##*/}
|
||||
|
||||
|
||||
cat << eof > "$blogfile"
|
||||
[[!meta title="Cdist $version released"]]
|
||||
|
||||
Here's a short overview about the changes found in version ${version}:
|
||||
|
||||
eof
|
||||
|
||||
$0 changelog-changes "$version" >> "$blogfile"
|
||||
|
||||
cat << eof >> "$blogfile"
|
||||
For more information visit the [[cdist homepage|software/cdist]].
|
||||
|
||||
[[!tag cdist config unix]]
|
||||
eof
|
||||
cd "$dir"
|
||||
git add "$file"
|
||||
# Allow git commit to fail if there are no changes
|
||||
git commit -m "cdist blog update: $version" "$blogfile" || true
|
||||
;;
|
||||
|
||||
ml-release)
|
||||
if [ $# -ne 1 ]; then
|
||||
echo "$0 ml-release version" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
version=$1; shift
|
||||
|
||||
to=${to_a}@${to_d}
|
||||
from=${from_a}@${from_d}
|
||||
|
||||
(
|
||||
cat << eof
|
||||
From: ${ml_name} <$from>
|
||||
To: cdist mailing list <$to>
|
||||
Subject: cdist $version released
|
||||
|
||||
Hello .*,
|
||||
|
||||
cdist $version has been released with the following changes:
|
||||
|
||||
eof
|
||||
|
||||
"$0" changelog-changes "$version"
|
||||
cat << eof
|
||||
|
||||
Cheers,
|
||||
|
||||
${ml_sig_name}
|
||||
|
||||
--
|
||||
Automatisation at its best level. With cdist.
|
||||
eof
|
||||
) | /usr/sbin/sendmail -f "$from" "$to"
|
||||
;;
|
||||
|
||||
release-git-tag)
|
||||
target_version=$($0 changelog-version)
|
||||
if git rev-parse --verify refs/tags/$target_version 2>/dev/null; then
|
||||
echo "Tag for $target_version exists, aborting"
|
||||
exit 1
|
||||
fi
|
||||
printf "Enter tag description for ${target_version}: "
|
||||
read tagmessage
|
||||
git tag "$target_version" -m "$$tagmessage"
|
||||
;;
|
||||
|
||||
release)
|
||||
set -e
|
||||
target_version=$($0 changelog-version)
|
||||
target_branch=$($0 version-branch)
|
||||
|
||||
echo "Beginning release process for $target_version"
|
||||
|
||||
# First check everything is sane
|
||||
"$0" check-date
|
||||
"$0" check-unittest
|
||||
|
||||
# Generate version file to be included in packaging
|
||||
"$0" version
|
||||
|
||||
# Ensure the git status is clean, else abort
|
||||
if ! git diff-index --name-only --exit-code HEAD ; then
|
||||
echo "Unclean tree, see files above, aborting"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Ensure we are on the master branch
|
||||
masterbranch=yes
|
||||
if [ "$(git rev-parse --abbrev-ref HEAD)" != "master" ]; then
|
||||
echo "Releases are happening from the master branch, aborting"
|
||||
|
||||
echo "Enter the magic word to release anyway"
|
||||
read magicword
|
||||
|
||||
if [ "$magicword" = "iknowwhatido" ]; then
|
||||
masterbranch=no
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$masterbranch" = yes ]; then
|
||||
# Ensure version branch exists
|
||||
if ! git rev-parse --verify refs/heads/$target_branch 2>/dev/null; then
|
||||
git branch "$target_branch"
|
||||
fi
|
||||
|
||||
# Merge master branch into version branch
|
||||
git checkout "$target_branch"
|
||||
git merge master
|
||||
fi
|
||||
|
||||
# Verify that after the merge everything works
|
||||
"$0" check-date
|
||||
"$0" check-unittest
|
||||
|
||||
# Generate man pages (indirect check if they build)
|
||||
make helper=${helper} WEBDIR=${WEBDIR} man
|
||||
|
||||
# Generate speeches (indirect check if they build)
|
||||
make helper=${helper} WEBDIR=${WEBDIR} speeches
|
||||
|
||||
#############################################################
|
||||
# Everything green, let's do the release
|
||||
|
||||
# Tag the current commit
|
||||
"$0" release-git-tag
|
||||
|
||||
# Also merge back the version branch
|
||||
if [ "$masterbranch" = yes ]; then
|
||||
git checkout master
|
||||
git merge "$target_branch"
|
||||
fi
|
||||
|
||||
# Publish git changes
|
||||
case "$run_as" in
|
||||
freebsd)
|
||||
# if we are not Nico :) then just push, no mirror
|
||||
git push
|
||||
;;
|
||||
*)
|
||||
make helper=${helper} WEBDIR=${WEBDIR} pub
|
||||
;;
|
||||
esac
|
||||
|
||||
# publish man, speeches, website
|
||||
if [ "$masterbranch" = yes ]; then
|
||||
make helper=${helper} WEBDIR=${WEBDIR} web-release-all
|
||||
else
|
||||
make helper=${helper} WEBDIR=${WEBDIR} web-release-all-no-latest
|
||||
fi
|
||||
|
||||
# Ensure that pypi release has the right version
|
||||
"$0" version
|
||||
|
||||
# Create and publish package for pypi
|
||||
make helper=${helper} WEBDIR=${WEBDIR} pypi-release
|
||||
|
||||
case "$run_as" in
|
||||
freebsd)
|
||||
;;
|
||||
*)
|
||||
# Archlinux release is based on pypi
|
||||
make archlinux-release
|
||||
;;
|
||||
esac
|
||||
|
||||
# Announce change on ML
|
||||
make helper=${helper} WEBDIR=${WEBDIR} ml-release
|
||||
|
||||
cat << eof
|
||||
Manual steps post release:
|
||||
|
||||
- linkedin
|
||||
- hackernews
|
||||
- reddit
|
||||
- twitter
|
||||
|
||||
eof
|
||||
|
||||
case "$run_as" in
|
||||
freebsd)
|
||||
cat <<eof
|
||||
Additional steps post release:
|
||||
- archlinux release
|
||||
eof
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
;;
|
||||
|
||||
test)
|
||||
export PYTHONPATH="$(pwd -P)"
|
||||
|
||||
if [ $# -lt 1 ]; then
|
||||
python3 -m cdist.test
|
||||
else
|
||||
python3 -m unittest "$@"
|
||||
fi
|
||||
;;
|
||||
|
||||
version-branch)
|
||||
"$0" changelog-version | cut -d. -f '1,2'
|
||||
;;
|
||||
|
||||
version)
|
||||
echo "VERSION = \"$(git describe)\"" > cdist/version.py
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown helper target $@ - aborting"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
|
@ -41,17 +41,20 @@ BANNER = """
|
|||
"P' "" ""
|
||||
"""
|
||||
|
||||
REMOTE_COPY = "scp -o User=root -q"
|
||||
REMOTE_EXEC = "ssh -o User=root -q"
|
||||
REMOTE_COPY = "scp -o User=root"
|
||||
REMOTE_EXEC = "ssh -o User=root"
|
||||
|
||||
|
||||
class Error(Exception):
|
||||
"""Base exception class for this project"""
|
||||
pass
|
||||
|
||||
|
||||
class UnresolvableRequirementsError(cdist.Error):
|
||||
"""Resolving requirements failed"""
|
||||
pass
|
||||
|
||||
|
||||
class CdistObjectError(Error):
|
||||
"""Something went wrong with an object"""
|
||||
|
||||
|
@ -60,9 +63,11 @@ class CdistObjectError(Error):
|
|||
self.source = " ".join(cdist_object.source)
|
||||
self.message = message
|
||||
|
||||
|
||||
def __str__(self):
|
||||
return '%s: %s (defined at %s)' % (self.name, self.message, self.source)
|
||||
return '%s: %s (defined at %s)' % (self.name,
|
||||
self.message,
|
||||
self.source)
|
||||
|
||||
|
||||
def file_to_list(filename):
|
||||
"""Return list from \n seperated file"""
|
||||
|
|
|
@ -22,6 +22,17 @@
|
|||
|
||||
# FIXME: other system types (not linux ...)
|
||||
|
||||
if [ -d "/proc/vz" -a ! -d "/proc/bc" ]; then
|
||||
echo openvz
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ -e "/proc/1/environ" ] &&
|
||||
cat "/proc/1/environ" | tr '\000' '\n' | grep -Eiq '^container='; then
|
||||
echo lxc
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ -r /proc/cpuinfo ]; then
|
||||
# this should only exist on virtual guest machines,
|
||||
# tested on vmware, xen, kvm
|
||||
|
@ -37,11 +48,12 @@ if [ -r /proc/cpuinfo ]; then
|
|||
if grep -q -i 'vmware' /sys/class/dmi/id/product_name; then
|
||||
echo "virtual_by_vmware"
|
||||
exit
|
||||
else
|
||||
if grep -q -i 'bochs' /sys/class/dmi/id/product_name; then
|
||||
elif grep -q -i 'bochs' /sys/class/dmi/id/product_name; then
|
||||
echo "virtual_by_kvm"
|
||||
exit
|
||||
fi
|
||||
elif grep -q -i 'virtualbox' /sys/class/dmi/id/product_name; then
|
||||
echo "virtual_by_virtualbox"
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -72,6 +72,11 @@ if [ -f /etc/owl-release ]; then
|
|||
fi
|
||||
|
||||
### Redhat and derivatives
|
||||
if grep -q ^Scientific /etc/redhat-release 2>/dev/null; then
|
||||
echo scientific
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if grep -q ^CentOS /etc/redhat-release 2>/dev/null; then
|
||||
echo centos
|
||||
exit 0
|
||||
|
|
|
@ -54,7 +54,7 @@ case "$($__explorer/os)" in
|
|||
owl)
|
||||
cat /etc/owl-release
|
||||
;;
|
||||
redhat|centos|mitel)
|
||||
redhat|centos|mitel|scientific)
|
||||
cat /etc/redhat-release
|
||||
;;
|
||||
slackware)
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__apt_key(7)
|
||||
======================
|
||||
Manage the list of keys used by apt
|
||||
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
NAME
|
||||
----
|
||||
cdist-type__apt_key - Manage the list of keys used by apt
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -47,9 +48,9 @@ EXAMPLES
|
|||
__apt_key UbuntuArchiveKey --keyid 437D05B5 --keyserver keyserver.ubuntu.com
|
||||
|
||||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
AUTHORS
|
||||
-------
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__apt_key_uri(7)
|
||||
==========================
|
||||
Add apt key from uri
|
||||
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
NAME
|
||||
----
|
||||
cdist-type__apt_key_uri - Add apt key from uri
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -37,9 +38,9 @@ EXAMPLES
|
|||
--state present
|
||||
|
||||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
AUTHORS
|
||||
-------
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__apt_norecommends(7)
|
||||
===============================
|
||||
Configure apt to not install recommended packages
|
||||
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
NAME
|
||||
----
|
||||
cdist-type__apt_norecommends - Configure apt to not install recommended packages
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -28,9 +29,9 @@ EXAMPLES
|
|||
__apt_norecommends
|
||||
|
||||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
AUTHORS
|
||||
-------
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__apt_ppa(7)
|
||||
======================
|
||||
Manage ppa repositories
|
||||
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
NAME
|
||||
----
|
||||
cdist-type__apt_ppa - Manage ppa repositories
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -36,9 +37,9 @@ EXAMPLES
|
|||
__apt_ppa ppa:sans-intern/missing-bits --state absent
|
||||
|
||||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
AUTHORS
|
||||
-------
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__apt_source(7)
|
||||
=========================
|
||||
Manage apt sources
|
||||
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
NAME
|
||||
----
|
||||
cdist-type__apt_source - Manage apt sources
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -55,9 +56,9 @@ EXAMPLES
|
|||
--component partner --state present
|
||||
|
||||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
AUTHORS
|
||||
-------
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__apt_update_index(7)
|
||||
===============================
|
||||
Update apt's package index
|
||||
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
NAME
|
||||
----
|
||||
cdist-type__apt_update_index - Update apt's package index
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -27,9 +28,9 @@ EXAMPLES
|
|||
__apt_update_index
|
||||
|
||||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
AUTHORS
|
||||
-------
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__block(7)
|
||||
====================
|
||||
Manage blocks of text in files
|
||||
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
NAME
|
||||
----
|
||||
cdist-type__block - Manage blocks of text in files
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -68,9 +69,9 @@ EXAMPLES
|
|||
DONE
|
||||
|
||||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
AUTHORS
|
||||
-------
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__ccollect_source(7)
|
||||
==============================
|
||||
Manage ccollect sources
|
||||
|
||||
Nico Schottelius <nico-cdist--@--schottelius.org>
|
||||
NAME
|
||||
----
|
||||
cdist-type__ccollect_source - Manage ccollect sources
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -52,9 +53,12 @@ EXAMPLES
|
|||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
- ccollect(1)
|
||||
- http://www.nico.schottelius.org/software/ccollect/
|
||||
:manpage:`ccollect`\ (1)
|
||||
|
||||
|
||||
AUTHORS
|
||||
-------
|
||||
Nico Schottelius <nico-cdist--@--schottelius.org>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__cdist(7)
|
||||
====================
|
||||
Manage cdist installations
|
||||
|
||||
Nico Schottelius <nico-cdist--@--schottelius.org>
|
||||
NAME
|
||||
----
|
||||
cdist-type__cdist - Manage cdist installations
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -49,9 +50,9 @@ EXAMPLES
|
|||
__cdist --source "git://git.schottelius.org/cdist" /home/cdist/cdist
|
||||
|
||||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
AUTHORS
|
||||
-------
|
||||
Nico Schottelius <nico-cdist--@--schottelius.org>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__cdistmarker(7)
|
||||
==========================
|
||||
Add a timestamped cdist marker.
|
||||
|
||||
Daniel Maher <phrawzty+cdist--@--gmail.com>
|
||||
NAME
|
||||
----
|
||||
cdist-type__cdistmarker - Add a timestamped cdist marker.
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -41,9 +42,9 @@ EXAMPLES
|
|||
__cdistmarker --destination /tmp/cdist_marker --format '+%s'
|
||||
|
||||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdisty-type.html>`_
|
||||
AUTHORS
|
||||
-------
|
||||
Daniel Maher <phrawzty+cdist--@--gmail.com>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__config_file(7)
|
||||
==========================
|
||||
Manages config files
|
||||
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
NAME
|
||||
----
|
||||
cdist-type__config_file - _Manages config files
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -47,8 +48,12 @@ EXAMPLES
|
|||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
- `cdist-type__file(7) <cdist-type__file.html>`_
|
||||
:manpage:`cdist-type__file`\ (7)
|
||||
|
||||
|
||||
AUTHORS
|
||||
-------
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__consul(7)
|
||||
=====================
|
||||
Install consul
|
||||
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
NAME
|
||||
----
|
||||
cdist-type__consul - Install consul
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -40,9 +41,9 @@ EXAMPLES
|
|||
--version 0.4.1
|
||||
|
||||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
AUTHORS
|
||||
-------
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
os=$(cat "$__global/explorer/os")
|
||||
|
||||
case "$os" in
|
||||
centos|redhat|ubuntu|debian|archlinux|gentoo)
|
||||
scientific|centos|redhat|ubuntu|debian|archlinux|gentoo)
|
||||
# any linux should work
|
||||
:
|
||||
;;
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__consul_agent(7)
|
||||
===========================
|
||||
Manage the consul agent
|
||||
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
NAME
|
||||
----
|
||||
cdist-type__consul_agent - Manage the consul agent
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -164,8 +165,12 @@ EXAMPLES
|
|||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
- http://www.consul.io/docs/agent/options.html
|
||||
consul documentation at: <http://www.consul.io/docs/agent/options.html>.
|
||||
|
||||
|
||||
AUTHORS
|
||||
-------
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
os=$(cat "$__global/explorer/os")
|
||||
|
||||
case "$os" in
|
||||
centos|debian|redhat|ubuntu)
|
||||
scientific|centos|debian|redhat|ubuntu)
|
||||
# whitelist safeguard
|
||||
:
|
||||
;;
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__consul_check(7)
|
||||
=============================
|
||||
Manages consul checks
|
||||
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
NAME
|
||||
----
|
||||
cdist-type__consul_check - Manages consul checks
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -85,8 +86,12 @@ EXAMPLES
|
|||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
- `cdist-type__consul_agent(7) <cdist-type__consul_agent.html>`_
|
||||
:manpage:`cdist-type__consul_agent`\ (7)
|
||||
|
||||
|
||||
AUTHORS
|
||||
-------
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__consul_reload(7)
|
||||
============================
|
||||
Reload consul
|
||||
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
NAME
|
||||
----
|
||||
cdist-type__consul_reload - Reload consul
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -28,9 +29,9 @@ EXAMPLES
|
|||
__consul_reload
|
||||
|
||||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
AUTHORS
|
||||
-------
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__consul_service(7)
|
||||
=============================
|
||||
Manages consul services
|
||||
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
NAME
|
||||
----
|
||||
cdist-type__consul_service - Manages consul services
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -65,8 +66,12 @@ EXAMPLES
|
|||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
- `cdist-type__consul_agent(7) <cdist-type__consul_agent.html>`_
|
||||
:manpage:`cdist-type__consul_agent`\ (7)
|
||||
|
||||
|
||||
AUTHORS
|
||||
-------
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__consul_template(7)
|
||||
==============================
|
||||
Manage the consul-template service
|
||||
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
NAME
|
||||
----
|
||||
cdist-type__consul_template - Manage the consul-template service
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -124,8 +125,12 @@ EXAMPLES
|
|||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
- https://github.com/hashicorp/consul-template
|
||||
consul documentation at: <https://github.com/hashicorp/consul-template>.
|
||||
|
||||
|
||||
AUTHORS
|
||||
-------
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
os=$(cat "$__global/explorer/os")
|
||||
|
||||
case "$os" in
|
||||
centos|redhat)
|
||||
scientific|centos|redhat)
|
||||
# whitelist safeguard
|
||||
service_onchange='service consul-template status >/dev/null && service consul-template reload || true' \
|
||||
;;
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__consul_template_template(7)
|
||||
=======================================
|
||||
Manage consul-template templates
|
||||
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
NAME
|
||||
----
|
||||
cdist-type__consul_template_template - Manage consul-template templates
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -67,9 +68,12 @@ EXAMPLES
|
|||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
- `cdist-type__consul_template(7) <cdist-type__consul_template.html>`_
|
||||
- `cdist-type__consul_template_config(7) <cdist-type__consul_template_config.html>`_
|
||||
:manpage:`cdist-type__consul_template`\ (7), :manpage:`cdist-type__consul_template_config`\ (7)
|
||||
|
||||
|
||||
AUTHORS
|
||||
-------
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__consul_watch_checks(7)
|
||||
==================================
|
||||
Manages consul checks watches
|
||||
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
NAME
|
||||
----
|
||||
cdist-type__consul_watch_checks - Manages consul checks watches
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -54,9 +55,14 @@ EXAMPLES
|
|||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
- `cdist-type__consul_agent(7) <cdist-type__consul_agent.html>`_
|
||||
- http://www.consul.io/docs/agent/watches.html
|
||||
:manpage:`cdist-type__consul_agent`\ (7)
|
||||
|
||||
consul documentation at: <http://www.consul.io/docs/agent/watches.html>.
|
||||
|
||||
|
||||
AUTHORS
|
||||
-------
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__consul_watch_event(7)
|
||||
=================================
|
||||
Manages consul event watches
|
||||
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
NAME
|
||||
----
|
||||
cdist-type__consul_watch_event - Manages consul event watches
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -47,9 +48,14 @@ EXAMPLES
|
|||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
- `cdist-type__consul_agent(7) <cdist-type__consul_agent.html>`_
|
||||
- http://www.consul.io/docs/agent/watches.html
|
||||
:manpage:`cdist-type__consul_agent`\ (7)
|
||||
|
||||
consul documentation at: <http://www.consul.io/docs/agent/watches.html>.
|
||||
|
||||
|
||||
AUTHORS
|
||||
-------
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__consul_watch_key(7)
|
||||
===============================
|
||||
Manages consul key watches
|
||||
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
NAME
|
||||
----
|
||||
cdist-type__consul_watch_key - Manages consul key watches
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -44,9 +45,14 @@ EXAMPLES
|
|||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
- `cdist-type__consul_agent(7) <cdist-type__consul_agent.html>`_
|
||||
- http://www.consul.io/docs/agent/watches.html
|
||||
:manpage:`cdist-type__consul_agent`\ (7)
|
||||
|
||||
consul documentation at: <http://www.consul.io/docs/agent/watches.html>.
|
||||
|
||||
|
||||
AUTHORS
|
||||
-------
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__consul_watch_keyprefix(7)
|
||||
=====================================
|
||||
Manages consul keyprefix watches
|
||||
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
NAME
|
||||
----
|
||||
cdist-type__consul_watch_keyprefix - Manages consul keyprefix watches
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -44,9 +45,14 @@ EXAMPLES
|
|||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
- `cdist-type__consul_agent(7) <cdist-type__consul_agent.html>`_
|
||||
- http://www.consul.io/docs/agent/watches.html
|
||||
:manpage:`cdist-type__consul_agent`\ (7)
|
||||
|
||||
consul documentation at: <http://www.consul.io/docs/agent/watches.html>.
|
||||
|
||||
|
||||
AUTHORS
|
||||
-------
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__consul_watch_nodes(7)
|
||||
=================================
|
||||
Manages consul nodes watches
|
||||
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
NAME
|
||||
----
|
||||
cdist-type__consul_watch_nodes - Manages consul nodes watches
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -40,9 +41,14 @@ EXAMPLES
|
|||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
- `cdist-type__consul_agent(7) <cdist-type__consul_agent.html>`_
|
||||
- http://www.consul.io/docs/agent/watches.html
|
||||
:manpage:`cdist-type__consul_agent`\ (7)
|
||||
|
||||
consul documentation at: <http://www.consul.io/docs/agent/watches.html>.
|
||||
|
||||
|
||||
AUTHORS
|
||||
-------
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__consul_watch_service(7)
|
||||
===================================
|
||||
Manages consul service watches
|
||||
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
NAME
|
||||
----
|
||||
cdist-type__consul_watch_service - Manages consul service watches
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -64,9 +65,14 @@ EXAMPLES
|
|||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
- `cdist-type__consul_agent(7) <cdist-type__consul_agent.html>`_
|
||||
- http://www.consul.io/docs/agent/watches.html
|
||||
:manpage:`cdist-type__consul_agent`\ (7)
|
||||
|
||||
consul documentation at: <http://www.consul.io/docs/agent/watches.html>.
|
||||
|
||||
|
||||
AUTHORS
|
||||
-------
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__consul_watch_services(7)
|
||||
====================================
|
||||
Manages consul services watches
|
||||
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
NAME
|
||||
----
|
||||
cdist-type__consul_watch_services - Manages consul services watches
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -40,9 +41,14 @@ EXAMPLES
|
|||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
- `cdist-type__consul_agent(7) <cdist-type__consul_agent.html>`_
|
||||
- http://www.consul.io/docs/agent/watches.html
|
||||
:manpage:`cdist-type__consul_agent`\ (7)
|
||||
|
||||
consul documentation at: <http://www.consul.io/docs/agent/watches.html>.
|
||||
|
||||
|
||||
AUTHORS
|
||||
-------
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__cron(7)
|
||||
===================
|
||||
Installs and manages cron jobs
|
||||
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
NAME
|
||||
----
|
||||
cdist-type__cron - Installs and manages cron jobs
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -67,8 +68,12 @@ EXAMPLES
|
|||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
- crontab(5)
|
||||
:manpage:`crontab`\ (5)
|
||||
|
||||
|
||||
AUTHORS
|
||||
-------
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__debconf_set_selections(7)
|
||||
=====================================
|
||||
Setup debconf selections
|
||||
|
||||
Nico Schottelius <nico-cdist--@--schottelius.org>
|
||||
NAME
|
||||
----
|
||||
cdist-type__debconf_set_selections - Setup debconf selections
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -36,9 +37,12 @@ EXAMPLES
|
|||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
- `cdist-type__update_alternatives(7) <cdist-type__update_alternatives.html>`_
|
||||
- debconf-set-selections(1)
|
||||
:manpage:`debconf-set-selections`\ (1), :manpage:`cdist-type__update_alternatives`\ (7)
|
||||
|
||||
|
||||
AUTHORS
|
||||
-------
|
||||
Nico Schottelius <nico-cdist--@--schottelius.org>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__directory(7)
|
||||
========================
|
||||
Manage a directory
|
||||
|
||||
Nico Schottelius <nico-cdist--@--schottelius.org>
|
||||
NAME
|
||||
----
|
||||
cdist-type__directory - Manage a directory
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -87,9 +88,9 @@ EXAMPLES
|
|||
--owner root --group root --mode 0755 --state present
|
||||
|
||||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
AUTHORS
|
||||
-------
|
||||
Nico Schottelius <nico-cdist--@--schottelius.org>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__dog_vdi(7)
|
||||
======================
|
||||
Manage Sheepdog VM images
|
||||
|
||||
Nico Schottelius <nico-cdist--@--schottelius.org>
|
||||
NAME
|
||||
----
|
||||
cdist-type__dog_vdi - Manage Sheepdog VM images
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -42,9 +43,12 @@ EXAMPLES
|
|||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
- dog(8)
|
||||
- qemu(1)
|
||||
:manpage:`qemu`\ (1), :manpage:`dog`\ (8)
|
||||
|
||||
|
||||
AUTHORS
|
||||
-------
|
||||
Nico Schottelius <nico-cdist--@--schottelius.org>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__file(7)
|
||||
===================
|
||||
Manage files.
|
||||
|
||||
Nico Schottelius <nico-cdist--@--schottelius.org>
|
||||
NAME
|
||||
----
|
||||
cdist-type__file - Manage files.
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -98,9 +99,9 @@ EXAMPLES
|
|||
DONE
|
||||
|
||||
|
||||
SEE ALSO
|
||||
--------
|
||||
* `cdist-type(7) <cdist-type.html>`_
|
||||
AUTHORS
|
||||
-------
|
||||
Nico Schottelius <nico-cdist--@--schottelius.org>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__firewalld_rule(7)
|
||||
=============================
|
||||
Configure firewalld rules
|
||||
|
||||
Nico Schottelius <nico-cdist--@--schottelius.org>
|
||||
NAME
|
||||
----
|
||||
cdist-type__firewalld_rule - Configure firewalld rules
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -64,9 +65,12 @@ EXAMPLES
|
|||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
- `cdist-type__iptables_rule(7) <cdist-type__iptables_rule.html>`_
|
||||
- firewalld(8)
|
||||
:manpage:`cdist-type__iptables_rule`\ (7), :manpage:`firewalld`\ (8)
|
||||
|
||||
|
||||
AUTHORS
|
||||
-------
|
||||
Nico Schottelius <nico-cdist--@--schottelius.org>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__git(7)
|
||||
==================
|
||||
Get and or keep git repositories up-to-date
|
||||
|
||||
Nico Schottelius <nico-cdist--@--schottelius.org>
|
||||
NAME
|
||||
----
|
||||
cdist-type__git - Get and or keep git repositories up-to-date
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -46,9 +47,9 @@ EXAMPLES
|
|||
__git /home/nico/cdist --source git://github.com/telmich/cdist.git --branch 2.1
|
||||
|
||||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
AUTHORS
|
||||
-------
|
||||
Nico Schottelius <nico-cdist--@--schottelius.org>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__group(7)
|
||||
====================
|
||||
Manage groups
|
||||
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
NAME
|
||||
----
|
||||
cdist-type__group - Manage groups
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -66,9 +67,9 @@ EXAMPLES
|
|||
__group foobar --gid 1234 --password 'crypted-password-string'
|
||||
|
||||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
AUTHORS
|
||||
-------
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -40,7 +40,7 @@ case "$os" in
|
|||
exit 0
|
||||
fi
|
||||
;;
|
||||
centos)
|
||||
scientific|centos)
|
||||
if [ "$name_sysconfig" = "$name_should" -a "$name_running" = "$name_should" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__hostname(7)
|
||||
=======================
|
||||
Set the hostname
|
||||
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
NAME
|
||||
----
|
||||
cdist-type__hostname - Set the hostname
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -38,9 +39,9 @@ EXAMPLES
|
|||
__hostname --name some-static-hostname
|
||||
|
||||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
AUTHORS
|
||||
-------
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -38,7 +38,7 @@ case "$os" in
|
|||
# handled in gencode-remote
|
||||
:
|
||||
;;
|
||||
centos)
|
||||
scientific|centos)
|
||||
__key_value sysconfig-hostname \
|
||||
--file /etc/sysconfig/network \
|
||||
--delimiter '=' \
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__iptables_apply(7)
|
||||
=============================
|
||||
Apply the rules
|
||||
|
||||
Nico Schottelius <nico-cdist--@--schottelius.org>
|
||||
NAME
|
||||
----
|
||||
cdist-type__iptables_apply - Apply the rules
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -28,9 +29,12 @@ None (__iptables_apply is used by __iptables_rule)
|
|||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
- `cdist-type__iptables_rule(7) <cdist-type__iptables_rule.html>`_
|
||||
- iptables(8)
|
||||
:manpage:`cdist-type__iptables_rule`\ (7), :manpage:`iptables`\ (8)
|
||||
|
||||
|
||||
AUTHORS
|
||||
-------
|
||||
Nico Schottelius <nico-cdist--@--schottelius.org>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__iptables_rule(7)
|
||||
============================
|
||||
Deploy iptable rulesets
|
||||
|
||||
Nico Schottelius <nico-cdist--@--schottelius.org>
|
||||
NAME
|
||||
----
|
||||
cdist-type__iptables_rule - Deploy iptable rulesets
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -49,9 +50,12 @@ EXAMPLES
|
|||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
- `cdist-type__iptables_apply(7) <cdist-type__iptables_apply.html>`_
|
||||
- iptables(8)
|
||||
:manpage:`cdist-type__iptables_apply`\ (7), :manpage:`iptables`\ (8)
|
||||
|
||||
|
||||
AUTHORS
|
||||
-------
|
||||
Nico Schottelius <nico-cdist--@--schottelius.org>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__issue(7)
|
||||
====================
|
||||
Manage issue
|
||||
|
||||
Nico Schottelius <nico-cdist--@--schottelius.org>
|
||||
NAME
|
||||
----
|
||||
cdist-type__issue - Manage issue
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -33,9 +34,9 @@ EXAMPLES
|
|||
__issue --source "$__type/files/myfancyissue"
|
||||
|
||||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
AUTHORS
|
||||
-------
|
||||
Nico Schottelius <nico-cdist--@--schottelius.org>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
cdist-type__jail(7)
|
||||
===================
|
||||
Manage FreeBSD jails
|
||||
|
||||
Jake Guffey <jake.guffey--@--eprotex.com>
|
||||
NAME
|
||||
----
|
||||
cdist-type__jail - Manage FreeBSD jails
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
-----------
|
||||
This type is used on FreeBSD to manage jails.
|
||||
This type is used on FreeBSD to manage jails by calling the appropriate per-version subtype.
|
||||
|
||||
|
||||
REQUIRED PARAMETERS
|
||||
|
@ -107,10 +108,15 @@ EXAMPLES
|
|||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
:manpage:`jail`\ (8)
|
||||
|
||||
|
||||
AUTHORS
|
||||
-------
|
||||
Jake Guffey <jake.guffey--@--jointheirstm.org>
|
||||
|
||||
|
||||
COPYING
|
||||
-------
|
||||
Copyright \(C) 2012 Jake Guffey. Free use of this software is
|
||||
Copyright \(C) 2012,2016 Jake Guffey. Free use of this software is
|
||||
granted under the terms of the GNU General Public License version 3 (GPLv3).
|
||||
|
|
|
@ -37,6 +37,19 @@ jaildir="$(cat "$__object/parameter/jaildir")"
|
|||
|
||||
__directory ${jaildir} --parents
|
||||
|
||||
set -- "$@" "$__object_id" "--state" "$state"
|
||||
cd "$__object/parameter"
|
||||
for property in $(ls .); do
|
||||
set -- "$@" "--$property" "$(cat "$property")"
|
||||
done
|
||||
|
||||
ver="$(cat "$__global/explorer/os_version")"
|
||||
if [ -n "$(echo "$ver" | grep '^10\.' )" ]; then # Version is 10.x
|
||||
__jail_freebsd10 "$@"
|
||||
else
|
||||
__jail_freebsd9 "$@"
|
||||
fi
|
||||
|
||||
# Debug
|
||||
#set +x
|
||||
|
||||
|
|
52
cdist/conf/type/__jail_freebsd10/gencode-local
Executable file
52
cdist/conf/type/__jail_freebsd10/gencode-local
Executable file
|
@ -0,0 +1,52 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# 2012 Jake Guffey (jake.guffey at eprotex.com)
|
||||
#
|
||||
# This file is part of cdist.
|
||||
#
|
||||
# cdist is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# cdist is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
#
|
||||
# The __jail type creates, configures, and deletes FreeBSD jails for use as
|
||||
# virtual machines.
|
||||
#
|
||||
|
||||
# Debug
|
||||
#exec >&2
|
||||
#set -x
|
||||
|
||||
jaildir="$(cat "$__object/parameter/jaildir")"
|
||||
|
||||
jailbase="$(cat "$__object/parameter/jailbase")"
|
||||
|
||||
state="$(cat "$__object/parameter/state")"
|
||||
|
||||
if [ "$state" = "present" ] && [ -z "$jailbase" ]; then
|
||||
exec >&2
|
||||
echo "jailbase is a REQUIRED parameter when state=present!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
remotebase="${jaildir}/jailbase.tgz"
|
||||
basepresent="$(cat "$__object/explorer/basepresent")"
|
||||
|
||||
if [ "$state" = "present" ]; then
|
||||
if [ "$basepresent" = "NONE" ]; then
|
||||
echo "$__remote_copy" "${jailbase}" "$__target_host:${remotebase}"
|
||||
fi # basepresent=NONE
|
||||
fi # state=present
|
||||
|
||||
# Debug
|
||||
#set +x
|
||||
|
362
cdist/conf/type/__jail_freebsd10/gencode-remote
Executable file
362
cdist/conf/type/__jail_freebsd10/gencode-remote
Executable file
|
@ -0,0 +1,362 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# 2012,2014,2016 Jake Guffey (jake.guffey at jointheirstm.org)
|
||||
#
|
||||
# This file is part of cdist.
|
||||
#
|
||||
# cdist is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# cdist is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
#
|
||||
# The __jail_freebsd10 type creates, configures, and deletes FreeBSD
|
||||
# jails for use as virtual machines on FreeBSD 10.x.
|
||||
#
|
||||
|
||||
# Debug
|
||||
#exec >&2
|
||||
#set -x
|
||||
|
||||
if [ -f "$__object/parameter/name" ]; then
|
||||
name="$(cat "$__object/parameter/name")"
|
||||
else
|
||||
name="$__object_id"
|
||||
fi
|
||||
|
||||
state="$(cat "$__object/parameter/state")"
|
||||
|
||||
started="true"
|
||||
# If the user wants the jail gone, it implies it shouldn't be started.
|
||||
[ -f "$__object/parameter/stopped" -o "$state" = "absent" ] && started="false"
|
||||
|
||||
if [ -f "$__object/parameter/ip" ]; then
|
||||
ip="$(cat "$__object/parameter/ip")"
|
||||
else
|
||||
# IP is an optional param when $state=absent, but
|
||||
# when $state=present, it's required. Enforce this.
|
||||
if [ "$state" = "present" ]; then
|
||||
exec >&2
|
||||
echo "If --state is 'present,' --ip must be given\!"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -f "$__object/parameter/hostname" ]; then
|
||||
hostname="$(cat "$__object/parameter/hostname")"
|
||||
else
|
||||
hostname="$name"
|
||||
fi
|
||||
|
||||
if [ -f "$__object/parameter/devfs-disable" ]; then
|
||||
devfsenable="false"
|
||||
else
|
||||
devfsenable="true"
|
||||
fi
|
||||
|
||||
devfsruleset="$(cat "$__object/parameter/devfs-ruleset")"
|
||||
|
||||
# devfs_ruleset being defined without devfs_enable being true
|
||||
# is pointless. Treat this as an error.
|
||||
if [ -n "$devfsruleset" -a "$devfsenable" = "false" ]; then
|
||||
exec >&2
|
||||
echo "Can't have --devfs-ruleset defined with --devfs-disable"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -f "$__object/parameter/onboot" ]; then
|
||||
onboot="true"
|
||||
fi
|
||||
|
||||
jaildir="$(cat "$__object/parameter/jaildir")"
|
||||
|
||||
present="$(cat "$__object/explorer/present")"
|
||||
#present="$(cat "$__type/explorer/present")"
|
||||
status="$(cat "$__object/explorer/status")"
|
||||
|
||||
# Handle ip="addr, addr" format
|
||||
if [ $(expr "${ip}" : ".*, .*") -gt "0" ]; then
|
||||
SAVE_IFS="$IFS"
|
||||
IFS=", "
|
||||
for cur_ip in ${ip}; do
|
||||
# Just get the last IP address for SSH to listen on
|
||||
mgmt_ip=$(echo "${ip}" | cut '-d ' -f1) # In case using "ip netmask" format rather than CIDR
|
||||
done
|
||||
IFS="$SAVE_IFS"
|
||||
else
|
||||
mgmt_ip=$(echo "${ip}" | cut '-d ' -f1) # In case using "ip netmask" format rather than CIDR
|
||||
fi
|
||||
|
||||
stopJail() {
|
||||
# Check $status before issuing command
|
||||
if [ "$status" = "STARTED" ]; then
|
||||
echo "/etc/rc.d/jail stop ${name}"
|
||||
echo "stop" >> "$__messages_out"
|
||||
fi
|
||||
}
|
||||
|
||||
startJail() {
|
||||
# Check $status before issuing command
|
||||
if [ "$status" = "NOTSTART" ]; then
|
||||
echo "/etc/rc.d/jail start ${name}"
|
||||
echo "start" >> "$__messages_out"
|
||||
fi
|
||||
}
|
||||
|
||||
deleteJail() {
|
||||
# Unmount the jail's mountpoints if necessary
|
||||
cat <<EOF
|
||||
output="\$(mount | grep "\/${name}\/dev")" || true
|
||||
if [ -n "\${output}" ]; then # /dev is still mounted...jail still running?
|
||||
/etc/rc.d/jail stop "${name}"
|
||||
fi
|
||||
output="\$(mount | grep "\/rw\/${name}\/")" || true
|
||||
if [ -n "\${output}" ]; then # >=1 rw mount is mounted still
|
||||
for DIR in "${output}"; do
|
||||
umount -F "/etc/fstab.${name}" "\$(echo "${DIR}" | awk '{print $3}')"
|
||||
done
|
||||
fi
|
||||
output="\$(mount | grep "\/${name} (")" || true
|
||||
if [ -n "\${output}" ]; then # ro mount is mounted still
|
||||
umount -F "/etc/fstab.${name}" "\$(echo "${output}" | awk '{print $3}')"
|
||||
fi
|
||||
EOF
|
||||
# Remove the jail's rw mountpoints
|
||||
echo "rm -rf \"${jaildir}/rw/${name}\""
|
||||
# Remove the jail directory
|
||||
echo "rm -rf \"${jaildir}/${name}\""
|
||||
# Remove the jail's fstab
|
||||
echo "rm -f \"/etc/fstab.${name}\""
|
||||
# Remove jail entry from jail.conf
|
||||
cat <<EOF
|
||||
sed -i .bak -E -e "/^${name} {\$/,/^}\\\$/d" /etc/jail.conf
|
||||
if [ -f "/etc/jail.conf.bak" ]; then
|
||||
rm -f "/etc/jail.conf.bak"
|
||||
fi
|
||||
EOF
|
||||
# Remove " $name " from jail_list if it's there
|
||||
cat <<EOF
|
||||
eval \$(grep '^jail_list=' /etc/rc.conf)
|
||||
|
||||
for JAIL in \${jail_list}; do
|
||||
if [ ! "\${JAIL}" = "${name}" ]; then
|
||||
new_list="\${new_list} \${JAIL}"
|
||||
fi
|
||||
done
|
||||
jail_list="\${new_list}"
|
||||
|
||||
sed -i '.bak' "s/^jail_list=\".*\"/jail_list=\"\${jail_list}\"/" /etc/rc.conf
|
||||
unset jail_list
|
||||
if [ -f "/etc/rc.conf.bak" ]; then
|
||||
rm -f /etc/rc.conf.bak
|
||||
fi
|
||||
EOF
|
||||
echo "delete" >> "$__messages_out"
|
||||
}
|
||||
|
||||
createJail() {
|
||||
# Create the jail directory
|
||||
cat <<EOF
|
||||
umask 022
|
||||
mkdir -p ${jaildir}/${name}
|
||||
if [ ! -d "${jaildir}/base" ]; then
|
||||
mkdir "${jaildir}/base"
|
||||
tar -xzf "${jaildir}/jailbase.tgz" -C "${jaildir}/base"
|
||||
if [ ! -d "${jaildir}/base/usr/local" ]; then
|
||||
mkdir -p "${jaildir}/base/usr/local"
|
||||
fi
|
||||
if [ ! -d "${jaildir}/base/usr/home" ]; then
|
||||
mkdir -p "${jaildir}/base/usr/home"
|
||||
fi
|
||||
if [ ! -d "${jaildir}/base/home" ]; then
|
||||
if [ ! -L "${jaildir}/base/home" ]; then
|
||||
SAVE=\$PWD; cd ${jaildir}/base
|
||||
ln -s usr/home home
|
||||
cd \$SAVE; unset SAVE
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if [ ! -d "${jaildir}/rw" ]; then
|
||||
mkdir "${jaildir}/rw"
|
||||
fi
|
||||
mkdir -p "${jaildir}/rw/${name}/etc"
|
||||
cp -r ${jaildir}/base/etc/* "${jaildir}/rw/${name}/etc/"
|
||||
if [ ! -f "${jaildir}/rw/${name}/etc/resolv.conf" ]; then
|
||||
cp /etc/resolv.conf "${jaildir}/rw/${name}/etc/"
|
||||
fi
|
||||
mkdir "${jaildir}/rw/${name}/local"
|
||||
mkdir "${jaildir}/rw/${name}/var"
|
||||
if [ -n "\$(ls ${jaildir}/base/var)" ]; then
|
||||
cp -r ${jaildir}/base/var/* "${jaildir}/rw/${name}/var/"
|
||||
fi
|
||||
chmod 755 "${jaildir}/rw/${name}/var"
|
||||
chmod 755 "${jaildir}/base/var"
|
||||
if [ ! -d "${jaildir}/base/var/db" ]; then
|
||||
mkdir -p "${jaildir}/base/var/db"
|
||||
fi
|
||||
if [ -n "\$(ls ${jaildir}/base/var/db)" ]; then
|
||||
chmod 755 "${jaildir}/rw/${name}/var/db"
|
||||
chmod 755 "${jaildir}/base/var/db"
|
||||
fi
|
||||
mkdir "${jaildir}/rw/${name}/home"
|
||||
if [ -n "\$(ls ${jaildir}/base/usr/home)" ]; then
|
||||
cp -r ${jaildir}/base/usr/home/* "${jaildir}/rw/${name}/home/"
|
||||
fi
|
||||
mkdir "${jaildir}/rw/${name}/root"
|
||||
if [ -n "\$(ls -A ${jaildir}/base/root)" ]; then
|
||||
cp -r ${jaildir}/base/root/ "${jaildir}/rw/${name}/root/"
|
||||
fi
|
||||
|
||||
EOF
|
||||
echo "create" >> "$__messages_out"
|
||||
|
||||
# Create the ro+rw mountpoint entries in fstab
|
||||
cat <<EOF
|
||||
cat >/etc/fstab.${name} <<END
|
||||
${jaildir}/base ${jaildir}/${name} nullfs ro 0 0
|
||||
${jaildir}/rw/${name}/etc ${jaildir}/${name}/etc nullfs rw 0 0
|
||||
${jaildir}/rw/${name}/local ${jaildir}/${name}/usr/local nullfs rw 0 0
|
||||
${jaildir}/rw/${name}/var ${jaildir}/${name}/var nullfs rw 0 0
|
||||
${jaildir}/rw/${name}/home ${jaildir}/${name}/usr/home nullfs rw 0 0
|
||||
${jaildir}/rw/${name}/root ${jaildir}/${name}/root nullfs rw 0 0
|
||||
END
|
||||
EOF
|
||||
|
||||
# Add the jail configuration to jail.conf
|
||||
cat <<EOF
|
||||
# first check to see whether jail_enable="YES" exists in rc.conf or not and add it
|
||||
# if necessary
|
||||
|
||||
jail_enable="\$(grep '^jail_enable=' /etc/rc.conf | cut -d= -f2)"
|
||||
if [ -z "\$jail_enable" ]; then # no jail_enable line in rc.conf at all
|
||||
echo "jail_enable=\"YES\"" >>/etc/rc.conf
|
||||
elif [ ! "\$(echo \$jail_enable | tr '[a-z]' '[A-Z]' | tr -d '"')" = "YES" ]; then # jail_enable="NO"
|
||||
sed -i '.bak' 's/^jail_enable=.*$/jail_enable="YES"/g' /etc/rc.conf # fix this -^
|
||||
rm -f /etc/rc.conf.bak
|
||||
fi
|
||||
|
||||
jailfile=/etc/jail.conf
|
||||
jailheader="${name} {"
|
||||
|
||||
jaildata="path=\"${jaildir}/${name}\";"
|
||||
|
||||
if [ "$devfsenable" = "true" ]; then
|
||||
jaildata="\$jaildata
|
||||
mount.devfs;"
|
||||
else
|
||||
jaildata="\$jaildata
|
||||
mount.nodevfs;"
|
||||
fi
|
||||
|
||||
jaildata="\$jaildata
|
||||
host.hostname=\"${hostname}\";
|
||||
ip4.addr=\"${ip}\";
|
||||
exec.start=\"/bin/sh /etc/rc\";
|
||||
exec.stop=\"/bin/sh /etc/rc.shutdown\";
|
||||
exec.consolelog=\"/var/log/jail_${name}_console.log\";
|
||||
mount.fstab=\"/etc/fstab.${name}\";
|
||||
allow.mount;
|
||||
exec.clean;
|
||||
allow.set_hostname=0;
|
||||
allow.sysvipc=0;
|
||||
allow.raw_sockets=0;"
|
||||
|
||||
jailtrailer="}"
|
||||
|
||||
if [ "$devfsenable" = "true" ] && [ "${devfsruleset}" = "jailrules" ]; then # The default ruleset is to be used
|
||||
if [ ! -f /etc/devfs.rules ]; then
|
||||
touch /etc/devfs.rules
|
||||
fi
|
||||
if [ -z "\$(grep '\[jailrules=' /etc/devfs.rules)" ]; then # The default ruleset doesn't exist
|
||||
# Get the highest-numbered ruleset
|
||||
highest="\$(sed -n 's/\[.*=\([0-9]*\)\]/\1/pg' /etc/devfs.rules | sort -u | tail -n 1)" || true
|
||||
# increment by 1
|
||||
[ -z "\$highest" ] && highest=10
|
||||
let num="\${highest}+1" 2>&1 >/dev/null # Close the FD==fail...
|
||||
# add default ruleset
|
||||
cat >>/etc/devfs.rules <<END
|
||||
|
||||
[jailrules=\${num}]
|
||||
add include \\\$devfsrules_hide_all
|
||||
add include \\\$devfsrules_unhide_basic
|
||||
add include \\\$devfsrules_unhide_login
|
||||
END
|
||||
fi
|
||||
devfsruleset_num=\$(grep "\[${devfsruleset}=" /etc/devfs.rules | sed -n 's/\[.*=\([0-9]*\)\]/\1/pg')
|
||||
if [ -n "\$devfsruleset_num" ]; then
|
||||
jaildata="\$jaildata
|
||||
devfs_ruleset=\"\${devfsruleset_num}\";"
|
||||
fi
|
||||
fi
|
||||
|
||||
EOF
|
||||
|
||||
echo "printf \"%s\\n%s\n%s\n\" \"\$jailheader\" \"\$jaildata\" \"\$jailtrailer\" >>\"\$jailfile\""
|
||||
|
||||
# Add $name to jail_list if $onboot=yes
|
||||
if [ "$onboot" = "yes" ]; then
|
||||
|
||||
# first check to see whether jail_enable="YES" exists in rc.conf or not and add it
|
||||
# if necessary
|
||||
|
||||
cat <<EOF
|
||||
eval "\$(grep '^jail_list=' /etc/rc.conf)"
|
||||
if [ -z "\$jail_list" ]; then # no jail_list line in rc.conf at all
|
||||
echo "jail_list=\"${name}\"" >>/etc/rc.conf
|
||||
else
|
||||
jail_list="\${jail_list} ${name}"
|
||||
sed -i '.bak' "s/^jail_list=\".*\"/jail_list=\"\${jail_list}\"/" /etc/rc.conf
|
||||
rm -f /etc/rc.conf.bak
|
||||
fi
|
||||
unset jail_list
|
||||
EOF
|
||||
echo "onboot" >> "$__messages_out"
|
||||
fi
|
||||
|
||||
# Add the normal entries into the jail's rc.conf
|
||||
cat <<EOF
|
||||
echo hostname=\"${hostname}\" >"${jaildir}/rw/${name}/etc/rc.conf"
|
||||
echo sshd_enable=\"YES\" >>"${jaildir}/rw/${name}/etc/rc.conf"
|
||||
echo sendmail_enable=\"NONE\" >>"${jaildir}/rw/${name}/etc/rc.conf"
|
||||
echo syslogd_enable=\"YES\" >>"${jaildir}/rw/${name}/etc/rc.conf"
|
||||
echo syslogd_flags=\"-ss\" >>"${jaildir}/rw/${name}/etc/rc.conf"
|
||||
|
||||
EOF
|
||||
# Configure SSHd's listening address
|
||||
cat <<EOF
|
||||
mgmt_ip="$(echo "$mgmt_ip" | sed -E -e 's#/[0-9]*$##g')"
|
||||
sed -E -i '.bak' -e "s/#?ListenAddress 0.0.0.0/ListenAddress \${mgmt_ip}/" "${jaildir}/rw/${name}/etc/ssh/sshd_config"
|
||||
EOF
|
||||
}
|
||||
|
||||
if [ "$present" = "EXISTS" ]; then # The jail currently exists
|
||||
if [ "$state" = "present" ]; then # The jail is supposed to exist
|
||||
if [ "$started" = "true" ]; then # The jail is supposed to be started
|
||||
startJail
|
||||
else # The jail is not supposed to be started
|
||||
stopJail
|
||||
fi
|
||||
exit 0
|
||||
else # The jail is not supposed to exist
|
||||
stopJail
|
||||
deleteJail
|
||||
exit 0
|
||||
fi
|
||||
else # The jail does not currently exist
|
||||
if [ "$state" = "absent" ]; then # The jail is not supposed to be present
|
||||
exit 0
|
||||
else # The jail is supposed to exist
|
||||
createJail
|
||||
[ "$started" = "true" ] && startJail
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
121
cdist/conf/type/__jail_freebsd10/man.rst
Normal file
121
cdist/conf/type/__jail_freebsd10/man.rst
Normal file
|
@ -0,0 +1,121 @@
|
|||
cdist-type__jail_freebsd10(7)
|
||||
=============================
|
||||
|
||||
NAME
|
||||
----
|
||||
cdist-type__jail_freeebsd10 - Manage FreeBSD jails
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
-----------
|
||||
This type is used on FreeBSD >= 10.0 to manage jails.
|
||||
|
||||
|
||||
REQUIRED PARAMETERS
|
||||
-------------------
|
||||
state
|
||||
Either "present" or "absent", defaults to "present".
|
||||
|
||||
jailbase
|
||||
The location of the .tgz archive containing the base fs for your jails.
|
||||
|
||||
|
||||
OPTIONAL PARAMETERS
|
||||
-------------------
|
||||
name
|
||||
The name of the jail. Default is to use the object_id as the jail name.
|
||||
|
||||
ip
|
||||
The ifconfig style IP/netmask combination to use for the jail guest. If
|
||||
the state parameter is "present," this parameter is required.
|
||||
|
||||
hostname
|
||||
The FQDN to use for the jail guest. Defaults to the name parameter.
|
||||
|
||||
interface
|
||||
The name of the physical interface on the jail server to bind the jail to.
|
||||
Defaults to the first interface found in the output of ifconfig -l.
|
||||
|
||||
devfs-ruleset
|
||||
The name of the devfs ruleset to associate with the jail. Defaults to
|
||||
"jailrules." This ruleset must be copied to the server via another type.
|
||||
To use this option, devfs-enable must be "true."
|
||||
|
||||
jaildir
|
||||
The location on the remote server to use for hosting jail filesystems.
|
||||
Defaults to /usr/jail.
|
||||
|
||||
BOOLEAN PARAMETERS
|
||||
------------------
|
||||
stopped
|
||||
Do not start the jail
|
||||
|
||||
devfs-disable
|
||||
Whether to disallow devfs mounting within the jail
|
||||
|
||||
onboot
|
||||
Whether to add the jail to rc.conf's jail_list variable.
|
||||
|
||||
|
||||
CAVEATS
|
||||
-------
|
||||
This type does not currently support modification of jail options. If, for
|
||||
example a jail needs to have its IP address or netmask changed, the jail must
|
||||
be removed then re-added with the correct IP address/netmask or the appropriate
|
||||
modifications to jail.conf need to be made through alternate means.
|
||||
|
||||
MESSAGES
|
||||
--------
|
||||
start
|
||||
The jail was started
|
||||
stop
|
||||
The jail was stopped
|
||||
create:
|
||||
The jail was created
|
||||
delete
|
||||
The jail was deleted
|
||||
onboot
|
||||
The jail was configured to start on boot
|
||||
|
||||
EXAMPLES
|
||||
--------
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
# Create a jail called www
|
||||
__jail_freebsd10 www --state present --ip "192.168.1.2" --jailbase /my/jail/base.tgz
|
||||
|
||||
# Remove the jail called www
|
||||
__jail_freebsd10 www --state absent --jailbase /my/jail/base.tgz
|
||||
|
||||
# The jail www should not be started
|
||||
__jail_freebsd10 www --state present --stopped \
|
||||
--ip "192.168.1.2 netmask 255.255.255.0" \
|
||||
--jailbase /my/jail/base.tgz
|
||||
|
||||
# Use the name variable explicitly
|
||||
__jail_freebsd10 thisjail --state present --name www \
|
||||
--ip "192.168.1.2" \
|
||||
--jailbase /my/jail/base.tgz
|
||||
|
||||
# Go nuts
|
||||
__jail_freebsd10 lotsofoptions --state present --name testjail \
|
||||
--ip "192.168.1.100 netmask 255.255.255.0" \
|
||||
--hostname "testjail.example.com" --interface "em0" \
|
||||
--onboot --jailbase /my/jail/base.tgz --jaildir /jails
|
||||
|
||||
|
||||
SEE ALSO
|
||||
--------
|
||||
:manpage:`jail`\ (8)
|
||||
|
||||
|
||||
AUTHORS
|
||||
-------
|
||||
Jake Guffey <jake.guffey--@--jointheirstm.org>
|
||||
|
||||
|
||||
COPYING
|
||||
-------
|
||||
Copyright \(C) 2012-2016 Jake Guffey. Free use of this software is
|
||||
granted under the terms of the GNU General Public License version 3 (GPLv3).
|
3
cdist/conf/type/__jail_freebsd10/parameter/boolean
Normal file
3
cdist/conf/type/__jail_freebsd10/parameter/boolean
Normal file
|
@ -0,0 +1,3 @@
|
|||
onboot
|
||||
stopped
|
||||
devfs-disable
|
|
@ -0,0 +1 @@
|
|||
jailrules
|
|
@ -0,0 +1 @@
|
|||
|
|
@ -0,0 +1 @@
|
|||
/usr/jail
|
1
cdist/conf/type/__jail_freebsd10/parameter/default/state
Normal file
1
cdist/conf/type/__jail_freebsd10/parameter/default/state
Normal file
|
@ -0,0 +1 @@
|
|||
present
|
8
cdist/conf/type/__jail_freebsd10/parameter/optional
Normal file
8
cdist/conf/type/__jail_freebsd10/parameter/optional
Normal file
|
@ -0,0 +1,8 @@
|
|||
name
|
||||
ip
|
||||
hostname
|
||||
interface
|
||||
devfs-ruleset
|
||||
jaildir
|
||||
jailbase
|
||||
state
|
54
cdist/conf/type/__jail_freebsd9/explorer/basepresent
Executable file
54
cdist/conf/type/__jail_freebsd9/explorer/basepresent
Executable file
|
@ -0,0 +1,54 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# 2012 Jake Guffey (jake.guffey at eprotex.com)
|
||||
#
|
||||
# This file is part of cdist.
|
||||
#
|
||||
# cdist is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# cdist is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
#
|
||||
# See if the jailbase.tgz or $jaildir/base dir exists
|
||||
#
|
||||
|
||||
# Debug
|
||||
#exec >&2
|
||||
#set -x
|
||||
|
||||
if [ -f "$__object/parameter/jaildir" ]; then
|
||||
jaildir="$(cat "$__object/parameter/jaildir")"
|
||||
else
|
||||
jaildir="/usr/jail"
|
||||
fi
|
||||
|
||||
name="base:jailbase.tgz"
|
||||
out=""
|
||||
|
||||
save_IFS="$IFS"
|
||||
IFS=":"
|
||||
for cur in $name; do
|
||||
if [ -e "${jaildir}/$cur" ]; then
|
||||
out="${out}:${cur}"
|
||||
fi
|
||||
done
|
||||
IFS="$save_IFS"
|
||||
|
||||
if [ -z "$out" ]; then
|
||||
echo "NONE"
|
||||
else
|
||||
echo "${out}"
|
||||
fi
|
||||
|
||||
# Debug
|
||||
#set +x
|
||||
|
43
cdist/conf/type/__jail_freebsd9/explorer/present
Executable file
43
cdist/conf/type/__jail_freebsd9/explorer/present
Executable file
|
@ -0,0 +1,43 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# 2012 Jake Guffey (jake.guffey at eprotex.com)
|
||||
#
|
||||
# This file is part of cdist.
|
||||
#
|
||||
# cdist is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# cdist is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
#
|
||||
# See if the requested jail exists
|
||||
#
|
||||
|
||||
# Debug
|
||||
#exec >&2
|
||||
#set -x
|
||||
|
||||
if [ -f "$__object/parameter/name" ]; then
|
||||
name="$(cat "$__object/parameter/name")"
|
||||
else
|
||||
name=$__object_id
|
||||
fi
|
||||
|
||||
if [ -f "$__object/parameter/jaildir" ]; then
|
||||
jaildir="$(cat "$__object/parameter/jaildir")"
|
||||
else
|
||||
jaildir="/usr/jail"
|
||||
fi
|
||||
|
||||
[ -d "${jaildir}/$name" ] && echo "EXISTS" || echo "NOTEXIST"
|
||||
|
||||
#set +x
|
||||
|
52
cdist/conf/type/__jail_freebsd9/explorer/status
Executable file
52
cdist/conf/type/__jail_freebsd9/explorer/status
Executable file
|
@ -0,0 +1,52 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# 2012 Jake Guffey (jake.guffey at eprotex.com)
|
||||
#
|
||||
# This file is part of cdist.
|
||||
#
|
||||
# cdist is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# cdist is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
#
|
||||
# See if the requested jail is started
|
||||
#
|
||||
|
||||
# Debug
|
||||
#exec >&2
|
||||
#set -x
|
||||
|
||||
if [ -f "$__object/parameter/name" ]; then
|
||||
name="$(cat "$__object/parameter/name")"
|
||||
else
|
||||
name="$__object_id"
|
||||
fi
|
||||
|
||||
if [ -f "$__object/parameter/jaildir" ]; then
|
||||
jaildir="$(cat "$__object/parameter/jaildir")"
|
||||
else
|
||||
jaildir="/usr/jail"
|
||||
fi
|
||||
# backslash-escaped $jaildir
|
||||
sjaildir="$(echo ${jaildir} | sed 's#/#\\/#g')"
|
||||
|
||||
jls_output="$(jls | grep "[ ]${sjaildir}\/${name}\$")" || true
|
||||
|
||||
if [ -n "${jls_output}" ]; then
|
||||
echo "STARTED"
|
||||
else
|
||||
echo "NOTSTART"
|
||||
fi
|
||||
|
||||
# Debug
|
||||
#set +x
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# 2012,2014 Jake Guffey (jake.guffey at eprotex.com)
|
||||
# 2012,2014,2016 Jake Guffey (jake.guffey at jointheirstm.org)
|
||||
#
|
||||
# This file is part of cdist.
|
||||
#
|
||||
|
@ -18,8 +18,8 @@
|
|||
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
#
|
||||
# The __jail type creates, configures, and deletes FreeBSD jails for use as
|
||||
# virtual machines.
|
||||
# The __jail_freebsd9 type creates, configures, and deletes FreeBSD jails
|
||||
# for use as virtual machines on FreeBSD 9.x and before.
|
||||
#
|
||||
|
||||
# Debug
|
||||
|
@ -354,3 +354,4 @@ else # The jail does not currently exist
|
|||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
122
cdist/conf/type/__jail_freebsd9/man.rst
Normal file
122
cdist/conf/type/__jail_freebsd9/man.rst
Normal file
|
@ -0,0 +1,122 @@
|
|||
cdist-type__jail_freebsd9(7)
|
||||
============================
|
||||
|
||||
NAME
|
||||
----
|
||||
cdist-type__jail_freebsd9 - Manage FreeBSD jails
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
-----------
|
||||
This type is used on FreeBSD <= 9.x to manage jails.
|
||||
|
||||
|
||||
REQUIRED PARAMETERS
|
||||
-------------------
|
||||
state
|
||||
Either "present" or "absent", defaults to "present".
|
||||
|
||||
jailbase
|
||||
The location of the .tgz archive containing the base fs for your jails.
|
||||
|
||||
|
||||
OPTIONAL PARAMETERS
|
||||
-------------------
|
||||
name
|
||||
The name of the jail. Default is to use the object_id as the jail name.
|
||||
|
||||
ip
|
||||
The ifconfig style IP/netmask combination to use for the jail guest. If
|
||||
the state parameter is "present," this parameter is required.
|
||||
|
||||
hostname
|
||||
The FQDN to use for the jail guest. Defaults to the name parameter.
|
||||
|
||||
interface
|
||||
The name of the physical interface on the jail server to bind the jail to.
|
||||
Defaults to the first interface found in the output of ifconfig -l.
|
||||
|
||||
devfs-ruleset
|
||||
The name of the devfs ruleset to associate with the jail. Defaults to
|
||||
"jailrules." This ruleset must be copied to the server via another type.
|
||||
To use this option, devfs-enable must be "true."
|
||||
|
||||
jaildir
|
||||
The location on the remote server to use for hosting jail filesystems.
|
||||
Defaults to /usr/jail.
|
||||
|
||||
BOOLEAN PARAMETERS
|
||||
------------------
|
||||
stopped
|
||||
Do not start the jail
|
||||
|
||||
devfs-disable
|
||||
Whether to disallow devfs mounting within the jail
|
||||
|
||||
onboot
|
||||
Whether to add the jail to rc.conf's jail_list variable.
|
||||
|
||||
|
||||
CAVEATS
|
||||
-------
|
||||
This type does not currently support modification of jail options. If, for
|
||||
example a jail needs to have its IP address or netmask changed, the jail must
|
||||
be removed then re-added with the correct IP address/netmask or the appropriate
|
||||
line (jail_<name>_ip="...") modified within rc.conf through some alternate
|
||||
means.
|
||||
|
||||
MESSAGES
|
||||
--------
|
||||
start
|
||||
The jail was started
|
||||
stop
|
||||
The jail was stopped
|
||||
create:
|
||||
The jail was created
|
||||
delete
|
||||
The jail was deleted
|
||||
onboot
|
||||
The jail was configured to start on boot
|
||||
|
||||
EXAMPLES
|
||||
--------
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
# Create a jail called www
|
||||
__jail_freebsd9 www --state present --ip "192.168.1.2" --jailbase /my/jail/base.tgz
|
||||
|
||||
# Remove the jail called www
|
||||
__jail_freebsd9 www --state absent --jailbase /my/jail/base.tgz
|
||||
|
||||
# The jail www should not be started
|
||||
__jail_freebsd9 www --state present --stopped \
|
||||
--ip "192.168.1.2 netmask 255.255.255.0" \
|
||||
--jailbase /my/jail/base.tgz
|
||||
|
||||
# Use the name variable explicitly
|
||||
__jail_freebsd9 thisjail --state present --name www \
|
||||
--ip "192.168.1.2" \
|
||||
--jailbase /my/jail/base.tgz
|
||||
|
||||
# Go nuts
|
||||
__jail_freebsd9 lotsofoptions --state present --name testjail \
|
||||
--ip "192.168.1.100 netmask 255.255.255.0" \
|
||||
--hostname "testjail.example.com" --interface "em0" \
|
||||
--onboot --jailbase /my/jail/base.tgz --jaildir /jails
|
||||
|
||||
|
||||
SEE ALSO
|
||||
--------
|
||||
:manpage:`jail`\ (8)
|
||||
|
||||
|
||||
AUTHORS
|
||||
-------
|
||||
Jake Guffey <jake.guffey--@--eprotex.com>
|
||||
|
||||
|
||||
COPYING
|
||||
-------
|
||||
Copyright \(C) 2012-2016 Jake Guffey. Free use of this software is
|
||||
granted under the terms of the GNU General Public License version 3 (GPLv3).
|
3
cdist/conf/type/__jail_freebsd9/parameter/boolean
Normal file
3
cdist/conf/type/__jail_freebsd9/parameter/boolean
Normal file
|
@ -0,0 +1,3 @@
|
|||
onboot
|
||||
stopped
|
||||
devfs-disable
|
|
@ -0,0 +1 @@
|
|||
jailrules
|
|
@ -0,0 +1 @@
|
|||
|
|
@ -0,0 +1 @@
|
|||
/usr/jail
|
1
cdist/conf/type/__jail_freebsd9/parameter/default/state
Normal file
1
cdist/conf/type/__jail_freebsd9/parameter/default/state
Normal file
|
@ -0,0 +1 @@
|
|||
present
|
8
cdist/conf/type/__jail_freebsd9/parameter/optional
Normal file
8
cdist/conf/type/__jail_freebsd9/parameter/optional
Normal file
|
@ -0,0 +1,8 @@
|
|||
name
|
||||
ip
|
||||
hostname
|
||||
interface
|
||||
devfs-ruleset
|
||||
jaildir
|
||||
jailbase
|
||||
state
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__key_value(7)
|
||||
========================
|
||||
Change property values in files
|
||||
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
NAME
|
||||
----
|
||||
cdist-type__key_value - Change property values in files
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -80,9 +81,9 @@ This type try to handle as many values as possible, so it doesn't use regexes.
|
|||
So you need to exactly specify the key and delimiter. Delimiter can be of any lenght.
|
||||
|
||||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
AUTHORS
|
||||
-------
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__line(7)
|
||||
===================
|
||||
Manage lines in files
|
||||
|
||||
Nico Schottelius <nico-cdist--@--schottelius.org>
|
||||
NAME
|
||||
----
|
||||
cdist-type__line - Manage lines in files
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -60,8 +61,12 @@ EXAMPLES
|
|||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
- grep(1)
|
||||
:manpage:`grep`\ (1)
|
||||
|
||||
|
||||
AUTHORS
|
||||
-------
|
||||
Nico Schottelius <nico-cdist--@--schottelius.org>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__link(7)
|
||||
===================
|
||||
Manage links (hard and symbolic)
|
||||
|
||||
Nico Schottelius <nico-cdist--@--schottelius.org>
|
||||
NAME
|
||||
----
|
||||
cdist-type__link - Manage links (hard and symbolic)
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -46,9 +47,9 @@ EXAMPLES
|
|||
__link /opt/plone --state absent
|
||||
|
||||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
AUTHORS
|
||||
-------
|
||||
Nico Schottelius <nico-cdist--@--schottelius.org>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__locale(7)
|
||||
=====================
|
||||
Configure locales
|
||||
|
||||
Nico Schottelius <nico-cdist--@--schottelius.org>
|
||||
NAME
|
||||
----
|
||||
cdit-type__locale - Configure locales
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -33,9 +34,12 @@ EXAMPLES
|
|||
|
||||
SEE ALSO
|
||||
--------
|
||||
- locale(1)
|
||||
- localedef(1)
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
:manpage:`locale`\ (1), :manpage:`localedef`\ (1)
|
||||
|
||||
|
||||
AUTHORS
|
||||
-------
|
||||
Nico Schottelius <nico-cdist--@--schottelius.org>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -30,7 +30,7 @@ case "$os" in
|
|||
# Debian needs a seperate package
|
||||
__package locales --state present
|
||||
;;
|
||||
archlinux|suse|ubuntu|centos)
|
||||
archlinux|suse|ubuntu|scientific|centos)
|
||||
:
|
||||
;;
|
||||
*)
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__motd(7)
|
||||
===================
|
||||
Manage message of the day
|
||||
|
||||
Nico Schottelius <nico-cdist--@--schottelius.org>
|
||||
NAME
|
||||
----
|
||||
cdist-type__motd - Manage message of the day
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -34,9 +35,9 @@ EXAMPLES
|
|||
__motd --source "$__type/files/my-motd"
|
||||
|
||||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
AUTHORS
|
||||
-------
|
||||
Nico Schottelius <nico-cdist--@--schottelius.org>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__mount(7)
|
||||
====================
|
||||
Manage filesystem mounts
|
||||
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
NAME
|
||||
----
|
||||
cdit-type__mount - Manage filesystem mounts
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -70,9 +71,9 @@ EXAMPLES
|
|||
--options "mfsmaster=mfsmaster.domain.tld,mfssubfolder=/one,nonempty,_netdev"
|
||||
|
||||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
AUTHORS
|
||||
-------
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__mysql_database(7)
|
||||
=============================
|
||||
Manage a MySQL database
|
||||
|
||||
Benedikt Koeppel <code@benediktkoeppel.ch>
|
||||
NAME
|
||||
----
|
||||
cdist-type__mysql_database - Manage a MySQL database
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -35,9 +36,9 @@ EXAMPLES
|
|||
__mysql_database "cdist" --name "cdist" --user "myuser" --password "mypwd"
|
||||
|
||||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
AUTHORS
|
||||
-------
|
||||
Benedikt Koeppel <code@benediktkoeppel.ch>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__package(7)
|
||||
======================
|
||||
Manage packages
|
||||
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
NAME
|
||||
----
|
||||
cdist-type__package - Manage packages
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -50,9 +51,9 @@ EXAMPLES
|
|||
__package vim --state present --type __package_apt
|
||||
|
||||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
AUTHORS
|
||||
-------
|
||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -30,7 +30,7 @@ else
|
|||
# By default determine package manager based on operating system
|
||||
os="$(cat "$__global/explorer/os")"
|
||||
case "$os" in
|
||||
amazon|centos|fedora|redhat) type="yum" ;;
|
||||
amazon|scientific|centos|fedora|redhat) type="yum" ;;
|
||||
archlinux) type="pacman" ;;
|
||||
debian|ubuntu|devuan) type="apt" ;;
|
||||
freebsd)
|
||||
|
|
1
cdist/conf/type/__package/parameter/boolean
Normal file
1
cdist/conf/type/__package/parameter/boolean
Normal file
|
@ -0,0 +1 @@
|
|||
upgrade
|
|
@ -4,3 +4,4 @@ type
|
|||
pkgsite
|
||||
state
|
||||
ptype
|
||||
repo
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__package_apt(7)
|
||||
==========================
|
||||
Manage packages with apt-get
|
||||
|
||||
Nico Schottelius <nico-cdist--@--schottelius.org>
|
||||
NAME
|
||||
----
|
||||
cdist-type__package_apt - Manage packages with apt-get
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -45,8 +46,12 @@ EXAMPLES
|
|||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
- `cdist-type__package(7) <cdist-type__package.html>`_
|
||||
:manpage:`cdist-type__package`\ (7)
|
||||
|
||||
|
||||
AUTHORS
|
||||
-------
|
||||
Nico Schottelius <nico-cdist--@--schottelius.org>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__package_emerge(7)
|
||||
=============================
|
||||
Manage packages with portage
|
||||
|
||||
Thomas Oettli <otho--@--sfs.biz>
|
||||
NAME
|
||||
----
|
||||
cdist-type__package_emerge - Manage packages with portage
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -46,9 +47,12 @@ EXAMPLES
|
|||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
- `cdist-type__package(7) <cdist-type__package.html>`_
|
||||
- `cdist-type__package_emerge_dependencies(7) <cdist-type__package_emerge_dependencies.html>`_
|
||||
:manpage:`cdist-type__package`\ (7), :manpage:`cdist-type__package_emerge_dependencies`\ (7)
|
||||
|
||||
|
||||
AUTHORS
|
||||
-------
|
||||
Thomas Oettli <otho--@--sfs.biz>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__package_emerge_dependencies(7)
|
||||
==========================================
|
||||
Install dependencies for __package_emerge
|
||||
|
||||
Thomas Oettli <otho--@--sfs.biz>
|
||||
NAME
|
||||
----
|
||||
cdist-type__package_emerge_dependencies - Install dependencies for __package_emerge
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -35,9 +36,12 @@ EXAMPLES
|
|||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
- `cdist-type__package(7) <cdist-type__package.html>`_
|
||||
- `cdist-type__package_emerge(7) <cdist-type__package_emerge.html>`_
|
||||
:manpage:`cdist-type__package`\ (7), :manpage:`cdist-type__package_emerge`\ (7)
|
||||
|
||||
|
||||
AUTHORS
|
||||
-------
|
||||
Thomas Oettli <otho--@--sfs.biz>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__package_luarocks(7)
|
||||
===============================
|
||||
Manage luarocks packages
|
||||
|
||||
Christian G. Warden <cwarden@xerus.org>
|
||||
NAME
|
||||
----
|
||||
cdist-type__package_luarocks - Manage luarocks packages
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -38,8 +39,12 @@ EXAMPLES
|
|||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
- `cdist-type__package(7) <cdist-type__package.html>`_
|
||||
:manpage:`cdist-type__package`\ (7)
|
||||
|
||||
|
||||
AUTHORS
|
||||
-------
|
||||
Christian G. Warden <cwarden@xerus.org>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__package_opkg(7)
|
||||
===========================
|
||||
Manage packages with opkg
|
||||
|
||||
Giel van Schijndel <giel+cdist--@--mortis.eu>
|
||||
NAME
|
||||
----
|
||||
cdist-type__package_opkg - Manage packages with opkg
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -38,8 +39,12 @@ EXAMPLES
|
|||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
- `cdist-type__package(7) <cdist-type__package.html>`_
|
||||
:manpage:`cdist-type__package`\ (7)
|
||||
|
||||
|
||||
AUTHORS
|
||||
-------
|
||||
Giel van Schijndel <giel+cdist--@--mortis.eu>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__package_pacman(7)
|
||||
=============================
|
||||
Manage packages with pacman
|
||||
|
||||
Nico Schottelius <nico-cdist--@--schottelius.org>
|
||||
NAME
|
||||
----
|
||||
cdist-type__package_pacman - Manage packages with pacman
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -41,8 +42,12 @@ EXAMPLES
|
|||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
- `cdist-type__package(7) <cdist-type__package.html>`_
|
||||
:manpage:`cdist-type__package`\ (7)
|
||||
|
||||
|
||||
AUTHORS
|
||||
-------
|
||||
Nico Schottelius <nico-cdist--@--schottelius.org>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__package_pip(7)
|
||||
==========================
|
||||
Manage packages with pip
|
||||
|
||||
Nico Schottelius <nico-cdist--@--schottelius.org>
|
||||
NAME
|
||||
----
|
||||
cdist-type__package_pip - Manage packages with pip
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -48,8 +49,12 @@ EXAMPLES
|
|||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
- `cdist-type__package(7) <cdist-type__package.html>`_
|
||||
:manpage:`cdist-type__package`\ (7)
|
||||
|
||||
|
||||
AUTHORS
|
||||
-------
|
||||
Nico Schottelius <nico-cdist--@--schottelius.org>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__package_pkg_freebsd(7)
|
||||
==================================
|
||||
Manage FreeBSD packages
|
||||
|
||||
Jake Guffey <jake.guffey--@--eprotex.com>
|
||||
NAME
|
||||
----
|
||||
cdist-type__package_pkg_freebsd - Manage FreeBSD packages
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -53,8 +54,12 @@ EXAMPLES
|
|||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
- `cdist-type__package(7) <cdist-type__package.html>`_
|
||||
:manpage:`cdist-type__package`\ (7)
|
||||
|
||||
|
||||
AUTHORS
|
||||
-------
|
||||
Jake Guffey <jake.guffey--@--eprotex.com>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__package_pkg(7)
|
||||
==========================
|
||||
Manage OpenBSD packages
|
||||
|
||||
Andi Brönnimann <andi-cdist--@--v-net.ch>
|
||||
NAME
|
||||
----
|
||||
cdist-type__package_pkg - Manage OpenBSD packages
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -53,8 +54,12 @@ EXAMPLES
|
|||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
- `cdist-type__package(7) <cdist-type__package.html>`_
|
||||
:manpage:`cdist-type__package`\ (7)
|
||||
|
||||
|
||||
AUTHORS
|
||||
-------
|
||||
Andi Brönnimann <andi-cdist--@--v-net.ch>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__package_pkgng_freebsd(7)
|
||||
====================================
|
||||
Manage FreeBSD packages with pkg-ng
|
||||
|
||||
Jake Guffey <jake.guffey--@--eprotex.com>
|
||||
NAME
|
||||
----
|
||||
cdist-type__package_pkgng_freebsd - Manage FreeBSD packages with pkg-ng
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -84,8 +85,12 @@ EXAMPLES
|
|||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
- `cdist-type__package(7) <cdist-type__package.html>`_
|
||||
:manpage:`cdist-type__package`\ (7)
|
||||
|
||||
|
||||
AUTHORS
|
||||
-------
|
||||
Jake Guffey <jake.guffey--@--eprotex.com>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__package_rubygem(7)
|
||||
==============================
|
||||
Manage rubygem packages
|
||||
|
||||
Chase Allen James <nx-cdist@nu-ex.com>
|
||||
NAME
|
||||
----
|
||||
cdist-type__package_rubygem - Manage rubygem packages
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -38,8 +39,12 @@ EXAMPLES
|
|||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
- `cdist-type__package(7) <cdist-type__package.html>`_
|
||||
:manpage:`cdist-type__package`\ (7)
|
||||
|
||||
|
||||
AUTHORS
|
||||
-------
|
||||
Chase Allen James <nx-cdist@nu-ex.com>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
|
@ -29,7 +29,7 @@ else
|
|||
# By default determine package manager based on operating system
|
||||
os="$(cat "$__global/explorer/os")"
|
||||
case "$os" in
|
||||
amazon|centos|fedora|redhat) type="yum" ;;
|
||||
amazon|scientific|centos|fedora|redhat) type="yum" ;;
|
||||
debian|ubuntu|devuan) type="apt" ;;
|
||||
archlinux) type="pacman" ;;
|
||||
*)
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
cdist-type__package_update_index(7)
|
||||
===================================
|
||||
Update the package index
|
||||
|
||||
Ricardo Catalinas Jiménez <jimenezrick--@--gmail.com>
|
||||
NAME
|
||||
----
|
||||
cdist-type__update_index - Update the package index
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -39,9 +40,9 @@ EXAMPLES
|
|||
__package_update_index --type apt
|
||||
|
||||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
AUTHORS
|
||||
-------
|
||||
Ricardo Catalinas Jiménez <jimenezrick--@--gmail.com>
|
||||
|
||||
|
||||
COPYING
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue