[cdist #6] create __all_in_one type
This commit is contained in:
parent
e89907dc24
commit
93b1d1baa1
7 changed files with 48 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -3,7 +3,8 @@ case "$__target_host" in
|
|||
localhost)
|
||||
#__my_computer
|
||||
#__colourful_file test --colour test1 --colour test2
|
||||
__my_dotfiles
|
||||
#__my_dotfiles
|
||||
__all_in_one --with-x --extra-packages git
|
||||
;;
|
||||
*)
|
||||
__my_nginx
|
||||
|
|
38
kjg/dot-cdist/type/__all_in_one/manifest
Normal file
38
kjg/dot-cdist/type/__all_in_one/manifest
Normal 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
|
1
kjg/dot-cdist/type/__all_in_one/parameter/boolean
Normal file
1
kjg/dot-cdist/type/__all_in_one/parameter/boolean
Normal file
|
@ -0,0 +1 @@
|
|||
with-x
|
|
@ -0,0 +1 @@
|
|||
extra-packages
|
|
@ -0,0 +1 @@
|
|||
extra-packages
|
0
kjg/dot-cdist/type/__all_in_one/singleton
Normal file
0
kjg/dot-cdist/type/__all_in_one/singleton
Normal file
Loading…
Reference in a new issue