Commit Graph

7091 Commits (6.9.7)
 

Author SHA1 Message Date
Darko Poljak 77dab4c5c6 Release 6.9.7 2 years ago
Darko Poljak 3e76d1cd3f ++changelog 2 years ago
poljakowski b8f601ee15 Merge branch 'rsync-ssh-multiplex' into 'master'
__rsync: Use $__remote_exec and thus the ssh multiplexing

See merge request ungleich-public/cdist!1001
2 years ago
fancsali be92731c5c Shell check quoting
We're actually echo-ing the command, hence the escape in front of the
quotes - the issue Shellcheck alludes too would actually occur, had the
escaping bakcslashes been omitted.
2 years ago
Darko Poljak 853e5cf7b4 ++changelog 2 years ago
poljakowski d8da298cdf Merge branch '__snakeoil_cert' into 'master'
new type: __snakeoil_cert

See merge request ungleich-public/cdist!1002
2 years ago
fnux 44eeb4bbfc Merge branch 'scanner' into 'master'
usable cdist scan

See merge request ungleich-public/cdist!993
2 years ago
ander 30ba796d06
new type: __snakeoil_cert 2 years ago
Darko Poljak 243a4b904a ++changelog 2 years ago
poljakowski 6528fd1c77 Merge branch 'feature/type/__debconf_set_selections/state-explorer' into 'master'
__debconf set selections: Add state explorer

See merge request ungleich-public/cdist!999
2 years ago
poljakowski 99188b4822 Merge branch '__download_improvements' into 'master'
[__download] improvements

See merge request ungleich-public/cdist!1003
2 years ago
poljakowski 62ea1d2721 Merge branch 'ander/update_readme' into 'master'
update README

See merge request ungleich-public/cdist!1004
2 years ago
ander a90e642c13
update README 2 years ago
ander 60753ddfcc
fix shellcheck 2 years ago
fancsali d937d53f3d Add quotes to rsync command 2 years ago
fancsali 2db40d8d70 Use $__remote_exec and thus the ssh multiplexing 2 years ago
ander 7b3f268df2
[__download] improvements
1. post download checksum verification
2. detect hashes without prefix
3. add optional --destination
4. updated man
2 years ago
Darko Poljak c308a28969 ++changelog 2 years ago
poljakowski 02aa88463a Merge branch 'fix/type/__pyvenv/group-explorer' into 'master'
__pyvenv: Fix group explorer

See merge request ungleich-public/cdist!998
2 years ago
Dennis Camera 6ede76b08b [type/__debconf_set_selections] man.rst: Fix line break in AUTHORS 2 years ago
Dennis Camera d596986af8 [type/__pyvenv] Fix group explorer 2 years ago
Darko Poljak defa3c22ea ++changelog 2 years ago
poljakowski d2ce55ea6e Merge branch '__git_fix_group_explorer' into 'master'
[__git] fix group explorer

See merge request ungleich-public/cdist!992
2 years ago
fnux e0c52d0e1d
[scanner] remove mention of non-implemented trigger soruce script 2 years ago
fnux b8733c65f5
[scanner] fix minor CLI handling and --list bugs / typo 2 years ago
fnux ab10b453f2
[scanner] populate cdist(1) 2 years ago
fnux 75c71f69c1
[scanner] pycodestyle compliance 2 years ago
ander 503a06ed28
[__git] fix group explorer
group name from numberic id wasn't resolved correctly.

try to use getent and fallback to reading /etc/group directly.
2 years ago
evilham 6210cccb28 ++changelog 2 years ago
evilham f14623e45f ++changelog 2 years ago
evilham 81b426e4e2 [__letsencrypt_cert] Revamp explorers, add locking.
Closes #839

See merge request ungleich-public/cdist!976

This patch joins all explorers in one to avoid starting multiple remote python
processes and uses a cdist-specific lock in /tmp/certbot.cdist.lock with a
60 seconds timeout.
2 years ago
evilham a696f3cf00 [__letsencrypt_cert] Revamp explorers, add locking.
This would fix #839

Certbot uses locking [1] even for read-only operations and does not properly
use exit codes, which means that sometimes it would print:
"Another instance of Certbot is already running" and exit with success.

However, the previous explorers would take that as the certificate being absent
and would trigger code generation.

The issue was made worse by having many explorers running certbot, so for N
certificates, we'd run certbot N*4 times, potentially "in parallel".

[1]: https://certbot.eff.org/docs/using.html#id5

This patch joins all explorers in one to avoid starting multiple remote python
processes and uses a cdist-specific lock in /tmp/certbot.cdist.lock with a
60 seconds timeout.

It has been tested with certbot 0.31.0 and 0.17 that the:

    from certbot.main import main

trick works. It is somewhat well documented so it can be somewhat relied upon.
2 years ago
evilham 0b05a8f5f7 [__apt_key*] Deprecate __apt_key_uri and improve __apt_key
See: https://code.ungleich.ch/ungleich-public/cdist/-/merge_requests/994

Previously this type was falling back to using the deprecated apt-key(8) by
checking for existence of files/directories on the controller host in
gencode-remote.

Adding `--use-deprecated-apt-key` as an explicit boolean serves two purposes:
1. It prevents fallbacks that might end up doing the wrong thing
   (as was the case)
2. It allows for a simple way to remove keys from the keyring that were
   previously added with apt-key(8) to /etc/apt/trusted.gpg

This parameter is added marked as deprecated as is only intended use is to
migrate to directory-based keyrings as recommended by Debian for a few releases.
It will be removed when Debian 11 stops being supported.

During the review process of this merge request, it was noted that the state of
PGP Key Servers is somewhat suboptimal, that the examples encouraged bad
practise (it is trivial to produce collisions for short key IDs), and that 
this use does not require the Web of Trust, but instead only the public key
that is signing the repository.

That is why this also adds `--source` as an argument allowing for in-type or
in-manifest provision of such public keys by the type/manifest maintainer and
the use of Key Servers is still supported, but discouraged.
2 years ago
evilham c00c8c2012 [__apt_key*] Deprecate __apt_key_uri and improve __apt_key
Previously this type was falling back to using the deprecated apt-key(8) by
checking for existence of files/directories on the controller host in
gencode-remote.

Adding `--use-deprecated-apt-key` as an explicit boolean serves two purposes:
1. It prevents fallbacks that might end up doing the wrong thing
   (as was the case)
2. It allows for a simple way to remove keys from the keyring that were
   previously added with apt-key(8) to /etc/apt/trusted.gpg

This parameter is added marked as deprecated as is only intended use is to
migrate to directory-based keyrings as recommended by Debian for a few releases.
It will be removed when Debian 11 stops being supported.

During the review process of this merge request, it was noted that the state of
PGP Key Servers is somewhat suboptimal, that the examples encouraged bad
practise (it is trivial to produce collisions for short key IDs), and that
this use does not require the Web of Trust, but instead only the public key
that is signing the repository.

That is why this also adds `--source` as an argument allowing for in-type or
in-manifest provision of such public keys by the type/manifest maintainer and
the use of Key Servers is still supported, but discouraged.
2 years ago
Dennis Camera a42ebc7a78 [type/__debconf_set_selections] Synchronise objects
Works around locking error:

	debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
2 years ago
Darko Poljak 3a25b80466 ++changelog 2 years ago
poljakowski 3e190c3481 Merge branch 'feature/type/__postgres/postgres_user-explorer' into 'master'
__postgres_*: Improve OS support and some cleanup

See merge request ungleich-public/cdist!990
2 years ago
Dennis Camera 9cf19388ab [type/__debconf_set_selections] Send message about each debconf setting that is changed 2 years ago
Dennis Camera a4122882f2 [type/__debconf_set_selections] Add state explorer
…and to make it work, replace --file with --line.

--file is deprecated because it does not work with the state explorer as the
contents of the file are not available on the target.
2 years ago
fnux 2232435c22
[scanner] initial documentation
Note: still needs to patch main cdist(1) manpage
2 years ago
fnux 3a9dd5b166
[scanner] add minimal (non-configurable) config mode 2 years ago
fnux 92fff7cb77
[scanner] fix crash on --list with name mapper provided 2 years ago
Dennis Camera 0f05f38384 [type/__postgres_role] Treat --password '' like no --password 2 years ago
Dennis Camera 0d33407b18 [type/__postgres_database] Proper quoting in state explorer 2 years ago
Dennis Camera 8296051653 [type/__postgres_extension] Add state explorer 2 years ago
Dennis Camera 3cf93249c3 [type/__postgres_extension] Include postgres_user explorer from __postgres_conf 2 years ago
Dennis Camera beb8da6d5f [type/__postgres_role] Include postgres_user explorer from __postgres_conf 2 years ago
Dennis Camera 58b279a8d0 [type/__postgres_database] Improve quoting 2 years ago
Dennis Camera 6ac8cbf98f [type/__postgres_database] Include postgres_user explorer from __postgres_conf 2 years ago
Darko Poljak 512e9b23c0 ++changelog 2 years ago