.
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:
|
pkg.installed:
|
||||||
- name: nginx
|
- name: nginx
|
||||||
|
|
||||||
create www folder structure:
|
configure www configuration:
|
||||||
file.recurse:
|
file.managed:
|
||||||
- name: /srv/www/htdocs
|
- name: /etc/nginx/vhosts.d/www.conf
|
||||||
- source: salt://nginx/files
|
- source: salt://nginx/files/www.conf
|
||||||
- include_empty: True
|
- template: jinja
|
||||||
- replace: False
|
- user: root
|
||||||
|
- group: root
|
||||||
|
- mode: "0644"
|
||||||
|
|
||||||
Start nginx:
|
Start nginx:
|
||||||
service.running:
|
service.running:
|
||||||
|
@ -4,6 +4,7 @@ Download harvester {{ item['version'] }} ISO:
|
|||||||
- name: /srv/www/htdocs/harvester/harvester-v{{ item['version'] }}-amd64.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: https://releases.rancher.com/harvester/v{{ item['version'] }}/harvester-v{{ item['version'] }}-amd64.iso
|
||||||
- source_hash: {{ item['hash']['iso'] }}
|
- source_hash: {{ item['hash']['iso'] }}
|
||||||
|
- makedirs: True
|
||||||
- user: root
|
- user: root
|
||||||
- group: root
|
- group: root
|
||||||
- mode: "0644"
|
- mode: "0644"
|
||||||
|
Loading…
Reference in New Issue
Block a user