0.1.15-DEV-20191117-205920
-------------------------- * ADD: - add tags to each task - added clean deploy task for site removals; will only run if task tag is used - added tower2.thezengarden.net to site list for testing awx installs/upgrades * MODIFY: - modified awx site reference to be tower
This commit is contained in:
parent
6b81563739
commit
3b5a8e2c54
@ -3,7 +3,7 @@
|
|||||||
proxy_site_conf_dir : /etc/nginx/conf.d
|
proxy_site_conf_dir : /etc/nginx/conf.d
|
||||||
proxy_site_file : "{{ proxy_site_conf_dir }}/zen_proxy.conf"
|
proxy_site_file : "{{ proxy_site_conf_dir }}/zen_proxy.conf"
|
||||||
proxy_site_version : 1.8
|
proxy_site_version : 1.8
|
||||||
proxy_site_revision : 20191031-132522
|
proxy_site_revision : 20191113-214118
|
||||||
|
|
||||||
|
|
||||||
proxy_site_log_path : /proxy_logs
|
proxy_site_log_path : /proxy_logs
|
||||||
|
@ -101,12 +101,18 @@ proxy_sites:
|
|||||||
max_upload : "{{ proxy_default_max_upload }}"
|
max_upload : "{{ proxy_default_max_upload }}"
|
||||||
|
|
||||||
|
|
||||||
awx.thezengarden.net:
|
tower.thezengarden.net:
|
||||||
proto : http
|
proto : http
|
||||||
dest : awx.thezengarden.net
|
dest : awx.thezengarden.net
|
||||||
port : 80
|
port : 80
|
||||||
|
|
||||||
|
|
||||||
|
tower2.thezengarden.net:
|
||||||
|
proto : http
|
||||||
|
dest : awx2.thezengarden.net
|
||||||
|
port : 80
|
||||||
|
|
||||||
|
|
||||||
dashboard.thezengarden.net:
|
dashboard.thezengarden.net:
|
||||||
proto : https
|
proto : https
|
||||||
dest : "{{ proxy_default_host }}"
|
dest : "{{ proxy_default_host }}"
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
- name: alter package list for centos
|
- name: alter package list for centos
|
||||||
set_fact:
|
set_fact:
|
||||||
proxy_package_list: ['nginx','git']
|
proxy_package_list: ['nginx','git']
|
||||||
|
tags: always
|
||||||
when: ansible_distribution == "CentOS"
|
when: ansible_distribution == "CentOS"
|
||||||
|
|
||||||
|
|
||||||
@ -10,20 +11,30 @@
|
|||||||
package:
|
package:
|
||||||
name : "{{ proxy_package_list }}"
|
name : "{{ proxy_package_list }}"
|
||||||
state : present
|
state : present
|
||||||
|
tags: always
|
||||||
|
|
||||||
|
|
||||||
- name: enable nginx at boot time
|
- name: enable nginx at boot time
|
||||||
service:
|
service:
|
||||||
name : nginx
|
name : nginx
|
||||||
enabled : yes
|
enabled : yes
|
||||||
|
tags: always
|
||||||
when: ansible_virtualization_type != "docker"
|
when: ansible_virtualization_type != "docker"
|
||||||
|
|
||||||
|
|
||||||
|
- name: clean conf.d
|
||||||
|
file:
|
||||||
|
path: "{{ proxy_site_conf_dir }}"
|
||||||
|
state: absent
|
||||||
|
tags: ['clean_deploy','never']
|
||||||
|
|
||||||
|
|
||||||
- name: create conf.d directory
|
- name: create conf.d directory
|
||||||
file:
|
file:
|
||||||
path : "{{ proxy_site_conf_dir }}"
|
path : "{{ proxy_site_conf_dir }}"
|
||||||
state : directory
|
state : directory
|
||||||
mode : 0755
|
mode : 0755
|
||||||
|
tags: always
|
||||||
|
|
||||||
|
|
||||||
- name: create log directory
|
- name: create log directory
|
||||||
@ -31,6 +42,7 @@
|
|||||||
path : "{{ proxy_site_log_path }}"
|
path : "{{ proxy_site_log_path }}"
|
||||||
state : directory
|
state : directory
|
||||||
mode : 0755
|
mode : 0755
|
||||||
|
tags: always
|
||||||
|
|
||||||
|
|
||||||
- name: clone ssl certs
|
- name: clone ssl certs
|
||||||
@ -38,6 +50,7 @@
|
|||||||
repo: "{{ ssl_repo }}"
|
repo: "{{ ssl_repo }}"
|
||||||
dest: "{{ proxy_site_ssl_directory }}"
|
dest: "{{ proxy_site_ssl_directory }}"
|
||||||
version: "{{ ssl_repo_branch }}"
|
version: "{{ ssl_repo_branch }}"
|
||||||
|
tags: always
|
||||||
notify: restart nginx
|
notify: restart nginx
|
||||||
|
|
||||||
|
|
||||||
@ -48,6 +61,7 @@
|
|||||||
mode : 0644
|
mode : 0644
|
||||||
with_dict:
|
with_dict:
|
||||||
- "{{ proxy_sites }}"
|
- "{{ proxy_sites }}"
|
||||||
|
tags: always
|
||||||
notify: restart nginx
|
notify: restart nginx
|
||||||
|
|
||||||
|
|
||||||
@ -55,4 +69,5 @@
|
|||||||
service:
|
service:
|
||||||
name : nginx
|
name : nginx
|
||||||
state : started
|
state : started
|
||||||
|
tags: always
|
||||||
when: ansible_virtualization_type != "docker"
|
when: ansible_virtualization_type != "docker"
|
@ -35,6 +35,11 @@ client_max_body_size {{ proxy_sites[item.key]['max_upload'] }};
|
|||||||
proxy_set_header X-Forwarded-Proto https;
|
proxy_set_header X-Forwarded-Proto https;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
|
|
||||||
|
{% if item.key == "tower.thezengarden.net" or item.key == "tower2.thezengarden.net" %}
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "upgrade";
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
proxy_pass {{ proxy_sites[item.key]['proto'] }}://{{ proxy_sites[item.key]['dest'] }}:{{ proxy_sites[item.key]['port'] }};
|
proxy_pass {{ proxy_sites[item.key]['proto'] }}://{{ proxy_sites[item.key]['dest'] }}:{{ proxy_sites[item.key]['port'] }};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user