Compare commits
17 commits
master
...
evilham-ma
Author | SHA1 | Date | |
---|---|---|---|
7ca2bfc14a | |||
|
6f4649efc6 | ||
|
d4059fd29e | ||
|
f58d662b32 | ||
|
310045d9fb | ||
|
250161e42d | ||
888cf54d99 | |||
ea3bd14d8b | |||
|
515992249d | ||
cd0c811d74 | |||
965829e18a | |||
bd66b6d948 | |||
b31e13eacf | |||
56a65518ab | |||
0b3c417aef | |||
678df1ec8a | |||
fefc828780 |
12 changed files with 81 additions and 20 deletions
7
README
7
README
|
@ -1,7 +0,0 @@
|
|||
cdist
|
||||
-----
|
||||
|
||||
cdist is a usable configuration management system.
|
||||
|
||||
For the web documentation have a look at https://www.cdi.st/
|
||||
or at docs/src for reStructuredText manual.
|
31
README.md
Normal file
31
README.md
Normal file
|
@ -0,0 +1,31 @@
|
|||
# cdist
|
||||
|
||||
**cdist** is a usable configuration management system.
|
||||
|
||||
It adheres to the [**KISS principle**](https://en.wikipedia.org/wiki/KISS_principle)
|
||||
and is being used in small up to enterprise grade environments.
|
||||
|
||||
For more information have a look at [**homepage**](https://cdi.st)
|
||||
or at **``docs/src``** for manual in **reStructuredText** format.
|
||||
|
||||
## Contributing
|
||||
|
||||
Merge/Pull requests can be made in both
|
||||
[upstream **GitLab**](https://code.ungleich.ch/ungleich-public/cdist/merge_requests)
|
||||
(managed by [**ungleich**](https://ungleich.ch))
|
||||
and [**GitHub** project](https://github.com/ungleich/cdist/pulls).
|
||||
|
||||
Issues can be made and other project management activites happen
|
||||
[**only in GitLab**](https://code.ungleich.ch/ungleich-public/cdist)
|
||||
(needs [**ungleich** account](https://account.ungleich.ch)).
|
||||
|
||||
For community-maintained types there is
|
||||
[**cdist-contrib** project](https://code.ungleich.ch/ungleich-public/cdist-contrib).
|
||||
|
||||
## Participating
|
||||
|
||||
IRC: ``#cdist`` @ freenode
|
||||
|
||||
Matrix: ``#cdist:ungleich.ch``
|
||||
|
||||
Mattermost: https://chat.ungleich.ch/ungleich/channels/cdist
|
|
@ -32,6 +32,10 @@ case "$os" in
|
|||
sysctl -n hw.ncpuonline
|
||||
;;
|
||||
|
||||
"freebsd"|"netbsd")
|
||||
sysctl -n hw.ncpu
|
||||
;;
|
||||
|
||||
*)
|
||||
if [ -r /proc/cpuinfo ]; then
|
||||
cores="$(grep "core id" /proc/cpuinfo | sort | uniq | wc -l)"
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#
|
||||
# 2014 Daniel Heule (hda at sfs.biz)
|
||||
# 2014 Thomas Oettli (otho at sfs.biz)
|
||||
# 2020 Evilham (contact at evilham.com)
|
||||
#
|
||||
# This file is part of cdist.
|
||||
#
|
||||
|
@ -18,9 +19,27 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
#
|
||||
|
||||
# FIXME: other system types (not linux ...)
|
||||
os=$("$__explorer/os")
|
||||
|
||||
case "$os" in
|
||||
"freebsd")
|
||||
# FreeBSD does not have /proc/cpuinfo even when procfs is used.
|
||||
# Instead there is a sysctl kern.vm_guest.
|
||||
# Which is 'none' if physical, else the virtualisation.
|
||||
vm_guest="$(sysctl -n kern.vm_guest 2>/dev/null || true)"
|
||||
if [ -n "${vm_guest}" ]; then
|
||||
if [ "${vm_guest}" = "none" ]; then
|
||||
echo "physical"
|
||||
exit
|
||||
fi
|
||||
echo "virtual_by_${vm_guest}"
|
||||
exit
|
||||
fi
|
||||
;;
|
||||
|
||||
*)
|
||||
# Defaulting to linux for compatibility with previous cdist behaviour
|
||||
|
||||
if [ -d "/proc/vz" ] && [ ! -d "/proc/bc" ]; then
|
||||
echo openvz
|
||||
|
@ -72,9 +91,13 @@ if [ -r /proc/cpuinfo ]; then
|
|||
fi
|
||||
fi
|
||||
echo "virtual_by_unknown"
|
||||
exit
|
||||
else
|
||||
echo "physical"
|
||||
exit
|
||||
fi
|
||||
else
|
||||
echo "unknown"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "unknown"
|
||||
|
|
|
@ -29,7 +29,7 @@ case "$os" in
|
|||
echo "$(sysctl -n hw.memsize)/1024" | bc
|
||||
;;
|
||||
|
||||
"openbsd")
|
||||
*"bsd")
|
||||
echo "$(sysctl -n hw.physmem) / 1048576" | bc
|
||||
;;
|
||||
|
||||
|
|
|
@ -91,6 +91,9 @@ if [ -z "${certbot_fullpath}" ]; then
|
|||
|
||||
certbot_fullpath=/usr/local/bin/certbot
|
||||
;;
|
||||
ubuntu)
|
||||
__package certbot
|
||||
;;
|
||||
*)
|
||||
echo "Unsupported os: $os" >&2
|
||||
exit 1
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#!/bin/sh -e
|
||||
#
|
||||
# 2016 Darko Poljak (darko.poljak at gmail.com)
|
||||
# 2020 Nico Schotetlius (nico.schottelius at ungleich.ch)
|
||||
#
|
||||
# This file is part of cdist.
|
||||
#
|
||||
|
@ -45,7 +46,7 @@ then
|
|||
pyvenv=$(cat "$pyvenvparam")
|
||||
else
|
||||
case "$os" in
|
||||
alpine) # no pyvenv on alpine - I assume others will follow
|
||||
alpine|ubuntu) # no pyvenv on alpine - I assume others will follow
|
||||
pyvenv="python3 -m venv"
|
||||
;;
|
||||
*)
|
||||
|
|
|
@ -9,7 +9,7 @@ cdist-type__pyvenv - Create or remove python virtual environment
|
|||
DESCRIPTION
|
||||
-----------
|
||||
This cdist type allows you to create or remove python virtual
|
||||
environment using pyvenv.
|
||||
environment using pyvenv on python3 -m venv.
|
||||
It assumes pyvenv is already installed. Concrete package depends
|
||||
on concrete OS and/or OS version/distribution.
|
||||
Ensure this for e.g. in your init manifest as in the following example:
|
||||
|
@ -57,7 +57,7 @@ EXAMPLES
|
|||
|
||||
__pyvenv /home/services/djangoenv
|
||||
|
||||
# Use specific pyvenv
|
||||
# Use specific pyvenv
|
||||
__pyvenv /home/foo/fooenv --pyvenv /usr/local/bin/pyvenv-3.4
|
||||
|
||||
# Create python virtualenv for user foo.
|
||||
|
@ -76,4 +76,3 @@ COPYING
|
|||
-------
|
||||
Copyright \(C) 2016 Darko Poljak. Free use of this software is
|
||||
granted under the terms of the GNU General Public License v3 or later (GPLv3+).
|
||||
|
||||
|
|
|
@ -280,9 +280,6 @@ class Remote(object):
|
|||
assert isinstance(command, (list, tuple)), (
|
||||
"list or tuple argument expected, got: %s" % command)
|
||||
|
||||
if return_output and stdout is not subprocess.PIPE:
|
||||
self.log.debug("return_output is True, ignoring stdout")
|
||||
|
||||
close_stdout = False
|
||||
close_stderr = False
|
||||
if self.save_output_streams:
|
||||
|
|
|
@ -19,6 +19,9 @@
|
|||
# such as ':' for POSIX or ';' for Windows.
|
||||
# If also specified at command line then values from command line are
|
||||
# appended to this value.
|
||||
# Notice that this works in a "last one wins" fashion, so if a type is redefined
|
||||
# in multiple conf_dirs, the last one in which it is defined will be used.
|
||||
# Consider using a unique prefix for your own roles if this can be an issue.
|
||||
# conf_dir = <dir1>:<dir2>
|
||||
#
|
||||
# init_manifest
|
||||
|
|
|
@ -2,6 +2,10 @@ Changelog
|
|||
---------
|
||||
|
||||
next:
|
||||
* Type __pyvenv: Switch to python3 -m venv for Ubuntu (Nico Schottelius)
|
||||
* Type __letsencrypt_cert: Whitelist Ubuntu (Nico Schottelius)
|
||||
|
||||
6.5.5: 2020-05-01
|
||||
* Core: Fix XDG_CONFIG_HOME config file location (Joachim Desroches)
|
||||
* Type __postgres_database: Add encoding, lc-collate, lc-ctype, template parameters (Timothée Floure)
|
||||
* Type __motd: Improve documentation and support for FreeBSD (Evil Ham)
|
||||
|
@ -10,6 +14,9 @@ next:
|
|||
* New type: __pf_apply_anchor (Kamila Součková, Evil Ham)
|
||||
* Type __pf_ruleset: Refactor (Kamila Součková, Evil Ham)
|
||||
* Type __pf_apply: Deprecate type (Kamila Součková, Evil Ham)
|
||||
* Configuration: Add notes to cdist.cfg.skeleton (Evil Ham)
|
||||
* Explorers cpu_cores, memory: Improve *BSD support (Evil Ham)
|
||||
* Core: Remove debug logging noise (Evil Ham)
|
||||
|
||||
6.5.4: 2020-04-11
|
||||
* Explorer init: Do not grep on non-existent init (Steven Armstrong)
|
||||
|
|
|
@ -3,7 +3,7 @@ Support
|
|||
|
||||
Chat
|
||||
~~~~
|
||||
Chat with us: `ungleich chat <https://chat.ungleich.ch/ungleich/channels/cdist>`_.
|
||||
Chat with us on `#cdist:ungleich.ch <https://ungleich.ch/u/projects/open-chat/>`_.
|
||||
|
||||
Mailing list
|
||||
~~~~~~~~~~~~
|
||||
|
|
Loading…
Reference in a new issue