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
|
||||
!hypervisor.yml
|
||||
!minecraft.yml
|
||||
!proxy.yml
|
||||
!unifi.yml
|
||||
/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"
|
||||
line: "- {{ bitwarden_realips }}"
|
||||
insertafter: "^real_ips"
|
||||
notify: rebuild_bitwarden
|
||||
|
||||
- name: Install Bitwarden systemd service
|
||||
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
|
||||
user:
|
||||
name: "{{ jenkins_user }}"
|
||||
@ -25,16 +20,6 @@
|
||||
validate: "visudo -cf %s"
|
||||
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
|
||||
apt:
|
||||
name: ansible
|
||||
|
@ -1,2 +1,5 @@
|
||||
postgresql_config: /etc/postgresql/13/main/pg_hba.conf
|
||||
postgresql_listen: "*"
|
||||
postgresql_trust:
|
||||
- "172.16.0.0/12"
|
||||
- "192.168.0.0/16"
|
||||
|
@ -3,15 +3,16 @@
|
||||
name: postgresql
|
||||
state: present
|
||||
|
||||
- name: Trust connections to PostgreSQL from Docker
|
||||
- name: Trust connections to PostgreSQL
|
||||
postgresql_pg_hba:
|
||||
dest: "{{ postgresql_config }}"
|
||||
contype: host
|
||||
databases: all
|
||||
users: all
|
||||
address: "172.16.0.0/12"
|
||||
address: "{{ item }}"
|
||||
method: trust
|
||||
register: postgresql_hba
|
||||
loop: "{{ postgresql_trust }}"
|
||||
|
||||
- name: Change PostgreSQL listen addresses
|
||||
postgresql_set:
|
||||
@ -33,9 +34,10 @@
|
||||
state: restarted
|
||||
when: postgresql_config.changed
|
||||
|
||||
- name: Allow database connections from Docker
|
||||
- name: Allow database connections
|
||||
ufw:
|
||||
rule: allow
|
||||
port: "5432"
|
||||
proto: tcp
|
||||
src: "172.16.0.0/12"
|
||||
src: "{{ item }}"
|
||||
loop: "{{ postgresql_trust }}"
|
||||
|
Loading…
Reference in New Issue
Block a user