[cdist #6] create __all_in_one type

This commit is contained in:
kjg 2020-05-15 22:06:39 +09:00
parent e89907dc24
commit 93b1d1baa1
7 changed files with 48 additions and 1 deletions

View file

@ -1087,3 +1087,8 @@ ex) openssl dhparam -outform PEM -out ${destination}/${domain}_dhparam.pem $keys
* cdist6
** __all_in_one
i used singleton, because it does not need specific host.
** __firewall

View file

@ -3,7 +3,8 @@ case "$__target_host" in
localhost) localhost)
#__my_computer #__my_computer
#__colourful_file test --colour test1 --colour test2 #__colourful_file test --colour test1 --colour test2
__my_dotfiles #__my_dotfiles
__all_in_one --with-x --extra-packages git
;; ;;
*) *)
__my_nginx __my_nginx

View file

@ -0,0 +1,38 @@
#!/bin/sh
os=$(cat "$__global/explorer/os")
case "$os" in
alpine)
os_pkgs="netcat-openbsd and tshark"
;;
debian|devuan)
os_pkgs="netcat tshark"
;;
fedora)
os_pkgs="nmap-ncat wireshark-cli"
;;
*)
echo "OS $os currently not supported" >&2
exit 1
;;
esac
base_pkgs="socat sipcalc sudo"
if [! -f ${__object}/parameter/with-x ]; then
for bpkg in ${base_pkgs}; do
__package ${bpkg} --state present
done
for opkg in ${os_pkgs}; do
__package ${opkg} --state present
done
fi
if [ -f "$__object/parameter/extra-packages" ]; then
for epkg in $(cat $__object/parameter/extra-packages); do
__package $epkg --state present
done
fi

View file

@ -0,0 +1 @@
with-x

View file

@ -0,0 +1 @@
extra-packages

View file

@ -0,0 +1 @@
extra-packages