learning session, new tipes updated cdist.org
This commit is contained in:
parent
be83fac3ac
commit
1b60734f2d
8 changed files with 69 additions and 0 deletions
|
@ -11,6 +11,11 @@ case "$__target_host" in
|
|||
__timezone Europe/Zurich
|
||||
|
||||
__my_computer
|
||||
|
||||
# __my_nginx
|
||||
|
||||
__my_nginx_site woo.com
|
||||
__my_nginx_site chee.se
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
7
balazs/dot-cdist/type/__my_nginx/manifest
Normal file
7
balazs/dot-cdist/type/__my_nginx/manifest
Normal file
|
@ -0,0 +1,7 @@
|
|||
|
||||
__package nginx --state present
|
||||
|
||||
|
||||
#Should I export this variable somehow and use it in an other type?
|
||||
#nginx_config_dir="/etc/nginx/"
|
||||
|
5
balazs/dot-cdist/type/__my_nginx/manifest~
Normal file
5
balazs/dot-cdist/type/__my_nginx/manifest~
Normal file
|
@ -0,0 +1,5 @@
|
|||
|
||||
__package nginx --state present
|
||||
|
||||
nginx_config_dir="/etc/nginx/"
|
||||
|
0
balazs/dot-cdist/type/__my_nginx/singleton
Normal file
0
balazs/dot-cdist/type/__my_nginx/singleton
Normal file
17
balazs/dot-cdist/type/__my_nginx_site/files/chee.se.conf
Normal file
17
balazs/dot-cdist/type/__my_nginx_site/files/chee.se.conf
Normal file
|
@ -0,0 +1,17 @@
|
|||
# This is a default site configuration which will simply return 404, preventing
|
||||
# chance access to any other virtualhost.
|
||||
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
|
||||
# Everything is a 404
|
||||
# location / {
|
||||
# return 404;
|
||||
# }
|
||||
|
||||
# You may need this to prevent return 404 recursion.
|
||||
# location = /404.html {
|
||||
# internal;
|
||||
# }
|
||||
}
|
17
balazs/dot-cdist/type/__my_nginx_site/files/woo.com.conf
Normal file
17
balazs/dot-cdist/type/__my_nginx_site/files/woo.com.conf
Normal file
|
@ -0,0 +1,17 @@
|
|||
# This is a default site configuration which will simply return 404, preventing
|
||||
# chance access to any other virtualhost.
|
||||
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
|
||||
# Everything is a 404
|
||||
# location / {
|
||||
# return 404;
|
||||
# }
|
||||
|
||||
# You may need this to prevent return 404 recursion.
|
||||
# location = /404.html {
|
||||
# internal;
|
||||
# }
|
||||
}
|
17
balazs/dot-cdist/type/__my_nginx_site/manifest
Normal file
17
balazs/dot-cdist/type/__my_nginx_site/manifest
Normal file
|
@ -0,0 +1,17 @@
|
|||
domain="$__object_id"
|
||||
nginx_config_dir="/etc/nginx/conf.d"
|
||||
|
||||
require="__package/nginx" __file $nginx_config_dir/$domain.conf --source - << EOF
|
||||
|
||||
server {
|
||||
|
||||
server_name $domain;
|
||||
listen [::]:80 ;
|
||||
|
||||
location / {
|
||||
autoindex on;
|
||||
root /var/www/html/$domain;
|
||||
}
|
||||
}
|
||||
EOF
|
||||
|
1
balazs/dot-cdist/type/__my_nginx_site/manifest~
Normal file
1
balazs/dot-cdist/type/__my_nginx_site/manifest~
Normal file
|
@ -0,0 +1 @@
|
|||
require="__package/nginx" __file $nginx_config_dir/"$__object_id".conf
|
Loading…
Reference in a new issue