Add nginx proxy server
This commit is contained in:
parent
82df91305a
commit
8362230eb4
1
.gitignore
vendored
1
.gitignore
vendored
@ -8,5 +8,6 @@
|
|||||||
!dockerbox.yml
|
!dockerbox.yml
|
||||||
!hypervisor.yml
|
!hypervisor.yml
|
||||||
!minecraft.yml
|
!minecraft.yml
|
||||||
|
!proxy.yml
|
||||||
!unifi.yml
|
!unifi.yml
|
||||||
/environments/
|
/environments/
|
||||||
|
11
proxy.yml
Normal file
11
proxy.yml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
- name: Install Proxy Server
|
||||||
|
hosts: proxyhosts
|
||||||
|
become: true
|
||||||
|
roles:
|
||||||
|
- base
|
||||||
|
- jenkins
|
||||||
|
- postgresql
|
||||||
|
- proxy
|
||||||
|
- docker
|
||||||
|
- gitea
|
||||||
|
- bitwarden
|
@ -1 +0,0 @@
|
|||||||
deb http://deb.debian.org/debian buster-backports main
|
|
@ -70,6 +70,7 @@
|
|||||||
path: "{{ bitwarden_root }}/bwdata/config.yml"
|
path: "{{ bitwarden_root }}/bwdata/config.yml"
|
||||||
line: "- {{ bitwarden_realips }}"
|
line: "- {{ bitwarden_realips }}"
|
||||||
insertafter: "^real_ips"
|
insertafter: "^real_ips"
|
||||||
|
notify: rebuild_bitwarden
|
||||||
|
|
||||||
- name: Install Bitwarden systemd service
|
- name: Install Bitwarden systemd service
|
||||||
template:
|
template:
|
||||||
|
@ -1 +0,0 @@
|
|||||||
deb http://ppa.launchpad.net/ansible/ansible/ubuntu trusty main
|
|
@ -1,8 +1,3 @@
|
|||||||
- name: Install GnuPG
|
|
||||||
apt:
|
|
||||||
name: gnupg
|
|
||||||
state: present
|
|
||||||
|
|
||||||
- name: Create Jenkins user
|
- name: Create Jenkins user
|
||||||
user:
|
user:
|
||||||
name: "{{ jenkins_user }}"
|
name: "{{ jenkins_user }}"
|
||||||
@ -25,16 +20,6 @@
|
|||||||
validate: "visudo -cf %s"
|
validate: "visudo -cf %s"
|
||||||
mode: 0440
|
mode: 0440
|
||||||
|
|
||||||
- name: Install Ansible source
|
|
||||||
copy:
|
|
||||||
src: ansible.list
|
|
||||||
dest: /etc/apt/sources.list.d/ansible.list
|
|
||||||
|
|
||||||
- name: Add Ansible source key
|
|
||||||
apt_key:
|
|
||||||
keyserver: keyserver.ubuntu.com
|
|
||||||
id: 93C4A3FD7BB9C367
|
|
||||||
|
|
||||||
- name: Install Ansible
|
- name: Install Ansible
|
||||||
apt:
|
apt:
|
||||||
name: ansible
|
name: ansible
|
||||||
|
@ -1,2 +1,5 @@
|
|||||||
postgresql_config: /etc/postgresql/13/main/pg_hba.conf
|
postgresql_config: /etc/postgresql/13/main/pg_hba.conf
|
||||||
postgresql_listen: "*"
|
postgresql_listen: "*"
|
||||||
|
postgresql_trust:
|
||||||
|
- "172.16.0.0/12"
|
||||||
|
- "192.168.0.0/16"
|
||||||
|
@ -3,15 +3,16 @@
|
|||||||
name: postgresql
|
name: postgresql
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Trust connections to PostgreSQL from Docker
|
- name: Trust connections to PostgreSQL
|
||||||
postgresql_pg_hba:
|
postgresql_pg_hba:
|
||||||
dest: "{{ postgresql_config }}"
|
dest: "{{ postgresql_config }}"
|
||||||
contype: host
|
contype: host
|
||||||
databases: all
|
databases: all
|
||||||
users: all
|
users: all
|
||||||
address: "172.16.0.0/12"
|
address: "{{ item }}"
|
||||||
method: trust
|
method: trust
|
||||||
register: postgresql_hba
|
register: postgresql_hba
|
||||||
|
loop: "{{ postgresql_trust }}"
|
||||||
|
|
||||||
- name: Change PostgreSQL listen addresses
|
- name: Change PostgreSQL listen addresses
|
||||||
postgresql_set:
|
postgresql_set:
|
||||||
@ -33,9 +34,10 @@
|
|||||||
state: restarted
|
state: restarted
|
||||||
when: postgresql_config.changed
|
when: postgresql_config.changed
|
||||||
|
|
||||||
- name: Allow database connections from Docker
|
- name: Allow database connections
|
||||||
ufw:
|
ufw:
|
||||||
rule: allow
|
rule: allow
|
||||||
port: "5432"
|
port: "5432"
|
||||||
proto: tcp
|
proto: tcp
|
||||||
src: "172.16.0.0/12"
|
src: "{{ item }}"
|
||||||
|
loop: "{{ postgresql_trust }}"
|
||||||
|
Loading…
Reference in New Issue
Block a user