forked from ungleich-public/cdist
Merge branch 'master' into beta
This commit is contained in:
commit
17c39ebef5
8 changed files with 44 additions and 13 deletions
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh -e
|
||||
#
|
||||
# 2015 Steven Armstrong (steven-cdist at armstrong.cc)
|
||||
# 2015-2019 Nico Schottelius (nico-cdist at schottelius.org)
|
||||
# 2015-2020 Nico Schottelius (nico-cdist at schottelius.org)
|
||||
# 2019 Timothée Floure (timothee.floure at ungleich.ch)
|
||||
#
|
||||
# This file is part of cdist.
|
||||
|
@ -37,10 +37,22 @@ fi
|
|||
# Those are default that might be overriden by os-specific logic.
|
||||
|
||||
data_dir="/var/lib/consul"
|
||||
conf_dir="/etc/consul/conf.d"
|
||||
conf_file="config.json"
|
||||
|
||||
|
||||
|
||||
tls_dir="$conf_dir/tls"
|
||||
|
||||
case "$os" in
|
||||
alpine)
|
||||
conf_dir="/etc/consul"
|
||||
conf_file="server.json"
|
||||
;;
|
||||
*)
|
||||
conf_dir="/etc/consul/conf.d"
|
||||
conf_file="config.json"
|
||||
;;
|
||||
esac
|
||||
|
||||
###
|
||||
# Sane deployment, based on distribution package when available.
|
||||
|
||||
|
@ -220,7 +232,7 @@ if [ -f "$__object/parameter/ca-file-source" ] || \
|
|||
[ -f "$__object/parameter/cert-file-source" ] || \
|
||||
[ -f "$__object/parameter/key-file-source" ]; then
|
||||
|
||||
requires="$config_deployment_requires" __directory $tls_dir \
|
||||
requires="$config_deployment_requires" __directory "$tls_dir" \
|
||||
--owner root --group "$group" --mode 750 --state "$state"
|
||||
|
||||
# Append to service restart requirements.
|
||||
|
|
0
cdist/conf/type/__cron/nonparallel
Normal file
0
cdist/conf/type/__cron/nonparallel
Normal file
|
@ -59,13 +59,13 @@ MESSAGES
|
|||
--------
|
||||
|
||||
change
|
||||
Certificte was changed.
|
||||
Certificate was changed.
|
||||
|
||||
create
|
||||
Certificte was created.
|
||||
Certificate was created.
|
||||
|
||||
remove
|
||||
Certificte was removed.
|
||||
Certificate was removed.
|
||||
|
||||
EXAMPLES
|
||||
--------
|
||||
|
|
|
@ -24,18 +24,18 @@ case "$type" in
|
|||
if [ -f "/var/cache/apt/pkgcache.bin" ]; then
|
||||
echo $(($(date +"%s")-$(stat --format '%Y' /var/cache/apt/pkgcache.bin)))
|
||||
else
|
||||
echo 0
|
||||
echo -- -1
|
||||
fi
|
||||
;;
|
||||
pacman)
|
||||
if [ -d "/var/lib/pacman/sync" ]; then
|
||||
echo $(($(date +"%s")-$(stat --format '%Y' /var/lib/pacman/sync)))
|
||||
else
|
||||
echo 0
|
||||
echo -- -1
|
||||
fi
|
||||
;;
|
||||
alpine)
|
||||
echo 0
|
||||
echo -- -1
|
||||
;;
|
||||
*) echo "Your specified type ($type) is currently not supported." >&2
|
||||
echo "Please contribute an implementation for it if you can." >&2
|
||||
|
|
|
@ -31,7 +31,8 @@ if [ -n "$maxage" ]; then
|
|||
if [ "$type" != "apt" ] && [ "$type" != "pacman" ]; then
|
||||
echo "ERROR: \"--maxage\" only supported for \"apt\" or \"pacman\" pkg-manager." >&2
|
||||
exit 1
|
||||
elif [ "$currage" -lt "$maxage" ]; then
|
||||
# do not exit if no value found (represented as -1)
|
||||
elif [ "$currage" -ne -1 ] && [ "$currage" -lt "$maxage" ]; then
|
||||
exit 0 # no need to update
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -37,11 +37,21 @@ mode="$(cat "$__object/parameter/mode")"
|
|||
destination="/$__object_id"
|
||||
venvparams="$(cat "$__object/parameter/venvparams")"
|
||||
pyvenvparam="$__object/parameter/pyvenv"
|
||||
|
||||
os=$(cat "$__global/explorer/os")
|
||||
|
||||
if [ -f "$pyvenvparam" ]
|
||||
then
|
||||
pyvenv=$(cat "$pyvenvparam")
|
||||
else
|
||||
case "$os" in
|
||||
alpine) # no pyvenv on alpine - I assume others will follow
|
||||
pyvenv="python3 -m venv"
|
||||
;;
|
||||
*)
|
||||
pyvenv="pyvenv"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
case $state_should in
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
name=$__object_id
|
||||
|
||||
case $("$__explorer/os") in
|
||||
'freebsd'|'netbsd'|'openbsd')
|
||||
'freebsd'|'netbsd'|'openbsd'|'alpine')
|
||||
database='passwd'
|
||||
;;
|
||||
# Default to using shadow passwords
|
||||
|
|
|
@ -5,6 +5,14 @@ next:
|
|||
* Core: Add trigger functionality (Nico Schottelius, Darko Poljak)
|
||||
* Core: Implement core support for python types (Darko Poljak)
|
||||
|
||||
6.5.3: 2020-04-03
|
||||
* Type __cron: Make non parallel due to race condition (Nico Schottelius)
|
||||
* Type __pyvenv: Use python3 -m venv on Alpine (Nico Schottelius)
|
||||
* Type __user: Fix missing shadow for alpine (llnu)
|
||||
* Type __consule_agent: Make conf_dir dependent on OS - fixes Alpine (Nico Schottelius)
|
||||
* Type __letsencrypt_cert: Fix typo (Andrew Schleifer)
|
||||
* Type __package_update_index: Fix maxage false positives (Matthias Stecher)
|
||||
|
||||
6.5.2: 2020-02-27
|
||||
* Type __update_alternatives: Add state explorer (Ander Punnar)
|
||||
* Explorer os_version: Add support for Alpine Linux (Jin-Guk Kwon)
|
||||
|
|
Loading…
Reference in a new issue