Browse Source

change host from gandalf2 to reverse_proxy

master
Edoardo Putti 8 years ago
parent
commit
e8e25e89c9
2 changed files with 8 additions and 10 deletions
  1. +2
    -4
      SETUP.md
  2. +6
    -6
      roles/reverse_proxy/tasks/main.yaml

+ 2
- 4
SETUP.md View File

@ -2,7 +2,5 @@ SETUP
========= =========
1. Copy `group_vars/all.yaml.example` to `group_vars/all.yaml` 1. Copy `group_vars/all.yaml.example` to `group_vars/all.yaml`
2. Fill `group_vars/all.yaml` with the gateway hostname and the content of the `user_ca_key`
3. Add the gateway hostname to `inventory`, set `ansible_host` and `ansible_user`
4. Add the ca hostname to `inventory`, set `ansible_host` and `ansible_user`
5. Add the ca\_request hostname to `inventory`, set `ansible_host` and `ansible_user`
2. Fill `group_vars/all.yaml` with the gateway hostname, the content of the `user_ca_key`, the public ip you are using and the domain you use
3. Add to the *inventory* the `gateway`, `reverse_proxy`, `ca` and `ca_request` entry. Follow the `inventory.example` format. These are the minimum entry that you neeed to make everything work in this playbook.

+ 6
- 6
roles/reverse_proxy/tasks/main.yaml View File

@ -3,34 +3,34 @@
file: file:
state: directory state: directory
dest: "/etc/nginx/http.conf.d" dest: "/etc/nginx/http.conf.d"
delegate_to: gandalf2
delegate_to: reverse_proxy
- name: Upload http to reverse proxy - name: Upload http to reverse proxy
template: template:
src: http.j2 src: http.j2
dest: "/etc/nginx/http.conf.d/http_{{ hostname }}.conf" dest: "/etc/nginx/http.conf.d/http_{{ hostname }}.conf"
delegate_to: gandalf2
delegate_to: reverse_proxy
- name: Create the map.conf directory for nginx - name: Create the map.conf directory for nginx
file: file:
state: directory state: directory
dest: "/etc/nginx/map.conf.d" dest: "/etc/nginx/map.conf.d"
delegate_to: gandalf2
delegate_to: reverse_proxy
- name: Create the upstream.conf directory for nginx - name: Create the upstream.conf directory for nginx
file: file:
state: directory state: directory
dest: "/etc/nginx/upstream.conf.d" dest: "/etc/nginx/upstream.conf.d"
delegate_to: gandalf2
delegate_to: reverse_proxy
- name: Upload mappings to reverse proxy - name: Upload mappings to reverse proxy
template: template:
src: map.j2 src: map.j2
dest: "/etc/nginx/map.conf.d/map_{{ hostname }}.conf" dest: "/etc/nginx/map.conf.d/map_{{ hostname }}.conf"
delegate_to: gandalf2
delegate_to: reverse_proxy
- name: Upload upstream to reverse proxy - name: Upload upstream to reverse proxy
template: template:
src: upstream.j2 src: upstream.j2
dest: "/etc/nginx/upstream.conf.d/upstream_{{ hostname }}.conf" dest: "/etc/nginx/upstream.conf.d/upstream_{{ hostname }}.conf"
delegate_to: gandalf2
delegate_to: reverse_proxy

Loading…
Cancel
Save