.
This commit is contained in:
parent
2d44511d66
commit
bc122be13e
4
salt/states/nginx/files/harvester/.gitignore
vendored
4
salt/states/nginx/files/harvester/.gitignore
vendored
@ -1,4 +0,0 @@
|
||||
# Ignore everything in this directory
|
||||
*
|
||||
# Except this file
|
||||
!.gitignore
|
9
salt/states/nginx/files/www.conf
Normal file
9
salt/states/nginx/files/www.conf
Normal file
@ -0,0 +1,9 @@
|
||||
server {
|
||||
listen 80 default;
|
||||
server_name www.{{ pillar['network']['domain'] }};
|
||||
location /{
|
||||
root /srv/www/htdocs/;
|
||||
index index.html;
|
||||
autoindex on;
|
||||
}
|
||||
}
|
@ -2,12 +2,14 @@ Install nginx:
|
||||
pkg.installed:
|
||||
- name: nginx
|
||||
|
||||
create www folder structure:
|
||||
file.recurse:
|
||||
- name: /srv/www/htdocs
|
||||
- source: salt://nginx/files
|
||||
- include_empty: True
|
||||
- replace: False
|
||||
configure www configuration:
|
||||
file.managed:
|
||||
- name: /etc/nginx/vhosts.d/www.conf
|
||||
- source: salt://nginx/files/www.conf
|
||||
- template: jinja
|
||||
- user: root
|
||||
- group: root
|
||||
- mode: "0644"
|
||||
|
||||
Start nginx:
|
||||
service.running:
|
||||
|
@ -4,6 +4,7 @@ Download harvester {{ item['version'] }} ISO:
|
||||
- name: /srv/www/htdocs/harvester/harvester-v{{ item['version'] }}-amd64.iso
|
||||
- source: https://releases.rancher.com/harvester/v{{ item['version'] }}/harvester-v{{ item['version'] }}-amd64.iso
|
||||
- source_hash: {{ item['hash']['iso'] }}
|
||||
- makedirs: True
|
||||
- user: root
|
||||
- group: root
|
||||
- mode: "0644"
|
||||
|
Loading…
Reference in New Issue
Block a user